调试模式时禁止读取模板缓存,避免每修改一次代码就要在后台清除一下缓存
修改thinkphp/library/think/Controller.php中
read_html_cache();
改为
if (Config::get('app_debug') == false) {
read_html_cache(); // 尝试从缓存中读取
}