I think elements can be cached. So you may get around  querying the
Models (which themselves use caching for when you do so) if the
contents of the elements are not updated often.

I came to Cake from Joomla as well and would like to hear about how to
do this. So far it seems that elements (with some help from helpers
and Models) do the trick. Using Models can allows for db based
customization.

On Jul 8, 12:35 pm, Mark <[email protected]> wrote:
> @James:
>
> from my experience, using
> ClassRegistry::init() instead of  App::import()
> creates the model instances only once (so called Singleton Pattern)
> therefore you dont have that much more memory usage..
>
> using this inside elements might not be MVC like, but it would come
> close to the above "Joomla Modules"
>
> >> "You CAN use App::import within an element to include the model(s) you
>
> need, and run queries on them but this not very efficient as you may
> end up with several complete instances of the same model being
> generated in a single request. "
--~--~---------~--~----~------------~-------~--~----~
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