From 69326f050fd73d89d50d4a9f7a4519b36d6d99fc Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 20 Jan 2018 18:06:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E6=9F=A5=E8=AF=A2=E7=BC=93?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 8ee6e15c..829e66d5 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -2355,7 +2355,7 @@ class Query } } - if (isset($cache) && false !== $resultSet) { + if (isset($cache) && $resultSet) { // 缓存数据集 $this->cacheData($key, $resultSet, $cache); } @@ -2513,7 +2513,7 @@ class Query $result = isset($resultSet[0]) ? $resultSet[0] : null; } - if (isset($cache) && false !== $result) { + if (isset($cache) && $result) { // 缓存数据 $this->cacheData($key, $result, $cache); }