Monday, February 1, 2010

Re: disabling cache when a user is logged

Jeremy Burns wrote:
> Could you use <cake:nocache></cake:nocache> in the right places?
> See http://book.cakephp.org/view/347/Marking-Non-Cached-Content-in-Views
>

I already do this for some parts of the layout (e.g., showing the
currently logged user), but I need it for the whole contents, and, as
far as I know, this is not possible: from the manual

"It should be noted that once an action is cached, the controller method
for the action will not be called - otherwise what would be the point of
caching the page. Therefore, it is not possible to wrap <cake:nocache>
</cake:nocache> around variables which are set from the controller as
they will be null."

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: