From 50810bef0c08d3cf1ef34f3d575121b1528324e9 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 2 Jun 2016 20:59:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BQuery=E7=B1=BB=E7=9A=84find?= =?UTF-8?q?=E5=92=8Cselect=E6=96=B9=E6=B3=95=E5=AF=B9cache=E7=9A=84?= =?UTF-8?q?=E5=A4=84=E7=90=86?= 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 1f61f856..fbebd4e6 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1602,7 +1602,7 @@ class Query } $resultSet = false; - if (!empty($options['cache'])) { + if (empty($options['fetch_sql']) && !empty($options['cache'])) { // 判断查询缓存 $cache = $options['cache']; $key = is_string($cache['key']) ? $cache['key'] : md5(serialize($options)); @@ -1683,7 +1683,7 @@ class Query $options['limit'] = 1; $result = false; - if (!empty($options['cache'])) { + if (empty($options['fetch_sql']) && !empty($options['cache'])) { // 判断查询缓存 $cache = $options['cache']; $key = is_string($cache['key']) ? $cache['key'] : md5(serialize($options));