Fix:
1、修改数据库没有数据时不进行缓存
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -65,7 +65,7 @@ class Quick extends PDOConnection | @@ -65,7 +65,7 @@ class Quick extends PDOConnection | ||
65 | } | 65 | } |
66 | } | 66 | } |
67 | $cacheData = parent::$fun($sql, $parameterMap, $replaceMap); | 67 | $cacheData = parent::$fun($sql, $parameterMap, $replaceMap); |
68 | - if ($this->_cacheStatus === true) { | 68 | + if ($this->_cacheStatus === true && !empty($cacheData)) { |
69 | if (!empty($this->_cacheTagName)) { | 69 | if (!empty($this->_cacheTagName)) { |
70 | $this->dbCache()->tag($this->_cacheTagName)->set($this->_cacheKey, $cacheData, $this->_cacheExpire); | 70 | $this->dbCache()->tag($this->_cacheTagName)->set($this->_cacheKey, $cacheData, $this->_cacheExpire); |
71 | } else { | 71 | } else { |
-
Please register or login to post a comment