如何在debug == 0时手动刷新模型高速缓存? [英] How to manually refresh Model Cache when debug == 0?

查看:150
本文介绍了如何在debug == 0时手动刷新模型高速缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我对我的CakePHP站点的生产版本(其中debug设置为0)上的数据库进行更改时,不会反映更改。我知道我可以通过临时改变调试到2,这似乎不安全,当这个网站被大量的人访问时,可以解决这个问题。我已经看过缓存文件,但由于没有数据库缓存文件的模型有问题(因为当调试是0,它不刷新这常常),没有什么我要删除。这有意义吗?我想要能够刷新缓存,而不必设置更高的调试级别。谢谢!

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!

推荐答案

您可以使用清除缓存插件:

You can use the Clear Cache plugin:

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

这篇关于如何在debug == 0时手动刷新模型高速缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆