Home  >  Article  >  Backend Development  >  Thinkphp关闭缓存的方法_PHP

Thinkphp关闭缓存的方法_PHP

WBOY
WBOYOriginal
2016-05-30 08:46:00733browse

因在开发中需要经常修改,从而要经常删除缓存,才能看到效果。

所以为了开发的方便,可以把缓存给去除。

1.找到\ThinkPHP\Common\convention.php和\ThinkPHP\Common\debug.php

2.打开这两个文件找到你想要的设置即可。

debug.php中

代码如下:


'TMPL_CACHE_ON'=>false,      // 默认开启模板缓存


convention.php中'

代码如下:


TMPL_CACHE_ON'   => false,  // 默认开启模板编译缓存 false 的话每次都重新编译模板

'ACTION_CACHE_ON'  => false,  // 默认关闭Action 缓存

'HTML_CACHE_ON'   => false,   // 默认关闭静态缓存


 

thinkphp 怎么关闭全部缓存?(baidu知道的满意回答)

代码如下:


APP_DEBUG=>true
DB_FIELD_CACHE=>false
HTML_CACHE_ON=>false

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn