摘要:
在application\config.php里加 //以下为静态缓存配置 'app_debug' => false,//false为开启静态缓存模式 'html_cache_on' => true, // 开启静态缓存 'html_cache_time' => 7200, // 全局静态缓存有效期 阅读全文
摘要:
use think\cache; public function index(){ //Cache::get('name')获取缓存,如果name值不存在则返回false; if (Cache::get('name')){ echo "<script>alert('旧缓存');</script>" 阅读全文