This article mainly introduces the method of thinkphp off the cache, the development of projects often need to flirt, there is a cache is not convenient, so always out of the way to close the cache, the need for friends can refer to the
Because you need to modify it frequently in your development, you should always delete the cache to see the effect.
So for the convenience of development, the cache can be removed.
1. Find thinkphpcommonconvention.php and thinkphpcommondebug.php
2. Open the two files and find the settings you want.
In debug.php
The code is as follows:
' tmpl_cache_on ' =>false,//default to open template cache
In convention.php '
The code is as follows:
Tmpl_cache_on ' => false,///default open template compile cache false every time you recompile the template
' action_cache_on ' => false,//default shutdown ACTION Cache
' html_cache_on ' => false,//default shutdown static cache
thinkphp How do I turn off all caches? (Baidu know the satisfaction of the answer)
The code is as follows:
App_debug=>true
Db_field_cache=>false
Html_cache_on=>false