Recently made with thinkphp Enterprise station,thinkphp inside a static cache function a variety of powerful cache, lingering. Now that you're not using the static caching feature, think about how to disable caching. For this cache, take a look at some of its core libraries. There are many ways to explain the principle and usage of caching mechanism, that is, how to forbid it. This record is shared and available for review.
Thinkphp in the data cache, including file mode, shared memory mode and database mode in a variety of ways to cache, through the plug-in method can also increase the need for later cache classes, so that application development can choose more suitable for their own cache, so as to effectively improve the efficiency of application execution. Currently supported caching methods include: File, Db, Apc, Memcache, Shmop, Sqlite, Xcache, Apachenote, and Eaccelerator
For the convenience of development, the cache can be removed first.
There are several ways to refer to:
(1) In the configuration file config.php We simply add the following two sentences to the file:
' tmpl_cache_on ' = false,//prohibit template compilation cache
' html_cache_on ' = false,//disable static caching
(This person feels more troublesome, but also in each module configuration inside Add.) )
(2) Close all caches in the portal file:
Define (' App_debug ', TRUE); Turn on debug mode
Define (' Db_field_cache ', false); Prohibit template compilation cache
Define (' html_cache_on ', false); Disable static caching
(3) modify it in the default configuration. Go inside The framework catalog thinkphp\conf to discover convention.php and debug.php.
In debug.php
' tmpl_cache_on ' =>false,//Open template cache by default
In convention.php
Tmpl_cache_on ' = False,//default to turn on the template compilation cache false to recompile the template every time
' action_cache_on ' = false,//close ACTION cache by default
' html_cache_on ' = false,//default off static cache
I use the third, the individual think the cache settings are not often to be modified, there is no need to use the second in the import file, the first I directly rejected, hehe. You know.