Home  >  Article  >  Backend Development  >  Thinkphp method to turn off caching_PHP tutorial

Thinkphp method to turn off caching_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 09:48:50752browse

How to turn off the cache in Thinkphp

This article mainly introduces the method of turning off the cache in Thinkphp. It is often necessary to play with it when developing projects. It is not convenient if there is a cache, so it is always out. How to turn off the cache, friends who need it can refer to it

Because it needs to be modified frequently during development, the cache must be deleted frequently to see the effect.

Therefore, for the convenience of development, the cache can be removed.

1. Find ThinkPHPCommonconvention.php and ThinkPHPCommondebug.php

2. Open these two files and find the settings you want.

 debug.php

The code is as follows:

 'TMPL_CACHE_ON'=>false, // Template caching is enabled by default

Convention.php in '

The code is as follows:

 TMPL_CACHE_ON' => false, // Enable template compilation cache by default. If false, recompile the template every time

 'ACTION_CACHE_ON' => false, // Action cache is turned off by default

 'HTML_CACHE_ON' => false, // Turn off static caching by default

How to turn off all caches in thinkphp? (Satisfactory answer that Baidu knows)

The code is as follows:

 APP_DEBUG=>true

DB_FIELD_CACHE=>false

HTML_CACHE_ON=>false

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1022059.htmlTechArticleHow to turn off the cache in Thinkphp. This article mainly introduces how to turn off the cache in Thinkphp. It is often necessary to play with it when developing projects. It is inconvenient to have a cache, so there is always a way to turn off the cache...
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