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