如何禁用thinkphp5.1的缓存功能?

更新于
2026-09-22 23:42:54
1阅读来源:SEO基础
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计295个文字,预计阅读时间需要2分钟。

如何禁用thinkphp5.1的缓存功能?

关闭ThinkPHP5.1缓存的步骤:

1.找到\ThinkPHP\Common\convention.php和\ThinkPHP\Common\debug.php文件;

2.在debug.php中修改内容为TMPL_CACHE_ON=false;

3.在convention.php中修改内容为ACTION_CA。

thinkphp5.1关闭缓存的方法:1、找到“\ThinkPHP\Common\convention.php”和“\ThinkPHP\Common\debug.php”文件;2、在debug.php中修改内容为“'TMPL_CACHE_ON'=>false,”;3、在convention.php中修改内容为“'ACTION_CACHE_ON' => false,”。

本教程操作环境:Windows7系统、thinkphp5.1版、Dell G3电脑。

thinkphp5.1怎么关闭缓存?

如何禁用thinkphp5.1的缓存功能?

Thinkphp开发时关闭缓存:

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

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

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

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

debug.php中

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

convention.php中'

TMPL_CACHE_ON' => false, // 默认开启模板编译缓存 false 的话每次都重新编译模板 'ACTION_CACHE_ON' => false, // 默认关闭Action 缓存 'HTML_CACHE_ON' => false, // 默认关闭静态缓存

ThinkPHP怎么关闭全部缓存?

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

推荐学习:《thinkPHP视频教程》

本文共计295个文字,预计阅读时间需要2分钟。

如何禁用thinkphp5.1的缓存功能?

关闭ThinkPHP5.1缓存的步骤:

1.找到\ThinkPHP\Common\convention.php和\ThinkPHP\Common\debug.php文件;

2.在debug.php中修改内容为TMPL_CACHE_ON=false;

3.在convention.php中修改内容为ACTION_CA。

thinkphp5.1关闭缓存的方法:1、找到“\ThinkPHP\Common\convention.php”和“\ThinkPHP\Common\debug.php”文件;2、在debug.php中修改内容为“'TMPL_CACHE_ON'=>false,”;3、在convention.php中修改内容为“'ACTION_CACHE_ON' => false,”。

本教程操作环境:Windows7系统、thinkphp5.1版、Dell G3电脑。

thinkphp5.1怎么关闭缓存?

如何禁用thinkphp5.1的缓存功能?

Thinkphp开发时关闭缓存:

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

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

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

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

debug.php中

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

convention.php中'

TMPL_CACHE_ON' => false, // 默认开启模板编译缓存 false 的话每次都重新编译模板 'ACTION_CACHE_ON' => false, // 默认关闭Action 缓存 'HTML_CACHE_ON' => false, // 默认关闭静态缓存

ThinkPHP怎么关闭全部缓存?

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

推荐学习:《thinkPHP视频教程》