Home > Article > Backend Development > How to turn off the cache in Thinkphp, thinkphp turns off the cache_PHP tutorial
Because it needs to be modified frequently during development, the cache must be deleted frequently to see the effect.
So 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
Copy code The code is as follows:
'TMPL_CACHE_ON'=>false, // Template caching is enabled by default
'
in convention.php
Copy code The code is as follows:
TMPL_CACHE_ON' => false, // The template compilation cache is enabled by default. If false, the template will be recompiled 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)
Copy code The code is as follows:
APP_DEBUG=>true
DB_FIELD_CACHE=>false
HTML_CACHE_ON=>false