If you had to do caching of model data, then I would recommend clearing the relevant caches in the afterSave() and afterDelete() methods. And even then, you should only need to clear the entry for the specific cached record. You just need to make sure you an reproduce the key that you're using to save the data from the afterSave and afterDelete locations.
Regards
Reuben Helms
On Saturday, 27 July 2013 10:05:30 UTC+10, advantage+ wrote:
-- On Saturday, 27 July 2013 10:05:30 UTC+10, advantage+ wrote:
Maybe I was reading wrong but I was under the impression if you cache an object (find data) if it was different it would delete the original cached data.
I am caching the results of a find, but as admin if I edit the record the cached data is always returned not the new data.
Is ther a way to fetch new data after save and delete cached info?
Dave Maharaj
Freelance Designer | Developer
www.movepixels.com | dave@movepixels.com | 709.800.0852
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment