Home  >  Article  >  Backend Development  >  How to turn off the cache in Thinkphp, thinkphp turns off the cache_PHP tutorial

How to turn off the cache in Thinkphp, thinkphp turns off the cache_PHP tutorial

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

How to turn off the cache in Thinkphp, thinkphp turns off the cache

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1022789.htmlTechArticleHow to close the cache in Thinkphp. Thinkphp closes the cache because it needs to be modified frequently during development, so the cache needs to be deleted frequently. See the effect. Therefore, for the convenience of development, you can slow down...
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