Thinkphp关闭缓存的方法_PHP教程

WBOY
Release: 2016-07-13 09:48:50
Original
713 people have browsed it

Thinkphp关闭缓存的方法

   这篇文章主要介绍了Thinkphp关闭缓存的方法,开发项目时经常需要调戏,有缓存的话不太方便,因此总出了关闭缓存的方法,需要的朋友可以参考下

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

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

  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

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1022059.htmlTechArticleThinkphp关闭缓存的方法 这篇文章主要介绍了Thinkphp关闭缓存的方法,开发项目时经常需要调戏,有缓存的话不太方便,因此总出了关闭缓存的方...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!