Thinkphp method to close cache: 1. Find the convention.php and debug.php files; 2. Modify the content in debug.php to "'TMPL_CACHE_ON' =>false,"; 3. In convention.php. Just modify the content in php to "'HTML_CACHE_ON' => false,".
The operating environment of this tutorial: Windows 7 system, ThinkPHP version 5, Dell G3 computer.
How to close cache in thinkphp?
How to turn off cache during Thinkphp development
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 \ThinkPHP\Common\convention.php and \ThinkPHP\Common\debug.php
2. Open these two files to find the settings you want.
debug.php in
'TMPL_CACHE_ON' =>false, // 默认开启模板缓存
convention.php in
'TMPL_CACHE_ON’ => false, // 默认开启模板编译缓存 false 的话每次都重新编译模板 'ACTION_CACHE_ON' => false, // 默认关闭Action 缓存 'HTML_CACHE_ON' => false, // 默认关闭静态缓存
Recommended learning: "thinkPHP Video Tutorial"
The above is the detailed content of How to close cache in thinkphp. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download
The most popular open source editor

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 English version
Recommended: Win version, supports code prompts!
