thx
i might actually consider that for getting the information
cached file - and if not possible manually through a query

the helper still needs to be a helper though
but this way there is backup :)

if i would just use the element without caching
this could be quit a lot of more "server load" to handle
as this helper (and therefore the table content) is needed on many
pages.


On 19 Aug., 00:49, francky06l <[EMAIL PROTECTED]> wrote:
> @Mark,
>
> Kalt suggestion is goof for an element. You could also user an helper
> and caching. The helper would check the cached file, if not there or
> expired your helper can do a requestAction and cache the results for
> future calls.
> I use this quite a lot for fetching data for select for example (like
> for a category list, not changing every 10 seconds, and avoiding
> queries), and manually delete the cache when I update the tables..
>
> hth
>
> On Aug 19, 12:38 am, Kalt <[EMAIL PROTECTED]> wrote:
>
> > Take a look at the "requestAction" method.
>
> > And instead of a helper, I think you'd better use an element.
>
> > On 19 août, 00:06, "Mark (Germany)" <[EMAIL PROTECTED]>
> > wrote:
>
> > > I have a helper which needs the "codecats" table data (20-40 rows)
> > > everywhere where it is used.
> > > i sure could ask for it in the controller:
> > > ->list('all')..
> > > and pass it the view
> > > there i can again pass it to the helper
>
> > > but is there
> > > a) a way to automatically pass it from the controller to the helper
> > > b) directly get the information into the helper (without having to
> > > manually query the DB)
>
> > > i have thought about using some caching or file-exporting (xml)
> > > the helper could read out this file again.
> > > but - what kind of backup would there be if the file gets lost somehow
> > > (as it is in temp folder the max lifetime may be over some time)?
> > > or is this a good practive anyway?
>
> > > thats what is bothering me right now
> > > as i do not know how to stick to the MVC pattern
>
> > > especially because this helper is not bound to specific controllers
> > > and may be used quite a lot.
> > > so it would be really a huge load of code if i have to do it as
> > > described above: controller -> view -> helper
>
> > > thx
> > > mark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to