How to manually refresh Model Cache when debug ==

2019-04-08 01:12发布

问题:

Whenever I make changes to the database on the production version of my CakePHP site, where debug is set to 0, the changes are not reflected. I know I can get around this by temporarily changing debug to 2, but this seems insecure, when this site is being visited by a large number of people. I have looked at the cache files, but since there is no database cache file for the model in question yet (since when debug is 0, it does not refresh this often), there is nothing for me to delete. Does this make sense? I want to be able to refresh the cache without having to set a higher debug level. Thanks!

回答1:

You can use the Clear Cache plugin:

https://github.com/ceeram/clear_cache/