Sunday, December 5, 2010

Re: Cache does not delete on UPDATE

On Sun, Dec 5, 2010 at 4:40 PM, Bart <bart.gloudemans@gmail.com> wrote:
> I see, thanks!
>
> So, the automagically deletion of cache files on UPDATE only works for
> View-caching and not for Query-cache/Cache-anything.

Yes, that's exactly it. Check the cache directory to find out how Cake
is naming the cache file in question, then add something along the
lines of:

if ($this->Post->save())
{
clearCache('name_of_cache_file', 'views', '');

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: