i would include the helper but NOT use the
var $cacheAction = '1 hour'

now set up your elements and cache them as you did before

this way the page itself should not be cached (no cacheAction
declared)
but the elements should!


On 10 Okt., 16:28, calzone <[email protected]> wrote:
> I believe cache action is used to cache the entire request.
>
> You would have to use nocache on the sections of your ctp file you
> don't want cached
> To cache just the elements, you would have to cache the actions
> associated with each element.
>
> On Oct 10, 2:42 am, Sarpidon <[email protected]> wrote:
>
>
>
> > Hello.
>
> > I have this layout
>
> > <body>
> > <?php echo $this->element(header, array('cache'' => true); ?>
> > <?php echo $content_for_layout; ?>
> > <?php echo $this->element(footer, array('cache'' => true); ?>
> > </body>
>
> > This creates two cache files in tmp/cache/views
>
> > on a controller I have this:
> > function view() {
> > var $cacheAction = '1 hour'
>
> > }
>
> > for some reason caching View caches the whole page again, including
> > header and footer. Is this how is supposed to work? Because this is
> > causing problems when the element has dynamic content (like latest
> > news).
> > I thought caching an action (like view) will only store the contents
> > of view.ctp and not the whole layout.
>
> > Am I missing something?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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