I am using CakePHP 1.3 and Caching most of my elements. From what I read, Cake is supposed to clear the cache when a new post is created. However, it is not working for me automatically?
I typically use a plugin to clear the cache or I do this manually thru FTP.
Anyone has a suggestion for me that would make my life easier by having cake perform this for me AUTOMAGICALLY?
thanks,
I believe CakePHP clears cache in the following manner:
articles_most_viewed.ctpand it is called from withinarticles index.ctpfile, then Cake will clear that respective element during an add, edit, delete action.frontpage_lastest_articles.ctpand it is only called inpages/display.ctpfile (frontpage), then CakePHP will not clear that element since it is not being called from within the affected/changed model/view, in this casearticlesmodel/controller/view.I havent figure out how to better approach this issue, if there is a better way. However, my quick fix is to call
clearCache()in myadmin_add.ctp,admin_edit.ctpandadmin_delete.ctpfiles as such:There might be a better way to handle this, but this is my solution for now. I would be glad to know if there is a better/automagic solution.