如何在开发模式下禁用模板缓存? [英] How I can disable templates caching in development mode?

查看:67
本文介绍了如何在开发模式下禁用模板缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我更改模板中的内容时,都必须手动清除缓存. 有什么方法可以在开发模式下禁用模板缓存?

Everytime when I change something in templates I have to clear cache manually. Is there some way to disable templates caching in development mode?

推荐答案

如果您使用的是PHP5.5,那么我建议在php.ini

If you are using PHP5.5, then I would suggest configuring opcache in php.ini

opcache.revalidate_freq=0

此值设置应从缓存更新视图的时间频率.该值通常为60秒左右.将其设置为0将使您的缓存每次都更新.

This value sets the time frequency when views should be updated from cache. This value is usually 60 seconds or so. Setting it to 0 will make your cache update every time.

这篇关于如何在开发模式下禁用模板缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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