Thinkphp disables caching. This article mainly introduces Thinkphp's method of disabling caching. it often needs to be played during development projects. it is not convenient to cache Thinkphp, therefore, Thinkphp is always the method for disabling the cache.
This article mainly introduces Thinkphp's method of disabling caching. during development projects, it is often difficult to use caching. Therefore, there is always a way to disable caching. For more information, see
Because it needs to be modified frequently during development, the cache must be deleted frequently to see the effect.
Therefore, cache can be removed for ease of development.
1. find \ ThinkPHP \ Common \ convention. php and \ ThinkPHP \ Common \ debug. php.
2. open these two files and find the settings you want.
Debugging. php
The code is as follows:
'Tmpl _ CACHE_ON '=> false, // The template cache is enabled by default.
In convention. php'
The code is as follows:
TMPL_CACHE_ON '=> false, // If template compilation cache is enabled by default, the template is re-compiled every time.
'Action _ CACHE_ON '=> false, // ACTION cache is disabled by default.
'HTML _ CACHE_ON '=> false, // The static cache is disabled by default.
How does thinkphp disable all caches? (The answer that baidu Knows is satisfactory)
The code is as follows:
APP_DEBUG => true
DB_FIELD_CACHE => false
HTML_CACHE_ON => false
This article mainly introduces Thinkphp's method of disabling caching. during development projects, it is often difficult to use caching, so there is always a way to disable caching...