From 92e5ca022611036069c5fb70d3ca5ddaf16b8e46 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 23 Jul 2016 23:14:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Template=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/Template.php b/library/think/Template.php index 97c01d4e..73d0f47d 100644 --- a/library/think/Template.php +++ b/library/think/Template.php @@ -173,7 +173,7 @@ class Template if (!empty($this->config['cache_id']) && $this->config['display_cache']) { // 读取渲染缓存 $cacheContent = Cache::get($this->config['cache_id']); - if (false !== $cacheContent) { + if (!is_null($cacheContent)) { echo $cacheContent; return; } @@ -303,7 +303,7 @@ class Template { if ($cacheId && $this->config['display_cache']) { // 缓存页面输出 - return Cache::get($cacheId) ? true : false; + return Cache::has($cacheId); } return false; }