From b56d75acf847140adede09b06f6768f5892cb2ea Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 23 Dec 2018 21:09:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Redis=E9=A9=B1=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/App.php | 2 +- library/think/cache/driver/Redis.php | 2 +- library/think/cache/driver/Wincache.php | 6 +++--- library/think/cache/driver/Xcache.php | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/library/think/App.php b/library/think/App.php index 551ddee822..ac8b0e91bd 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -20,7 +20,7 @@ */ class App extends Container { - const VERSION = '5.1.31 LTS'; + const VERSION = '5.1.32 LTS'; /** * 当前模块路径 diff --git a/library/think/cache/driver/Redis.php b/library/think/cache/driver/Redis.php index 8b1ba8dbad..813746e775 100644 --- a/library/think/cache/driver/Redis.php +++ b/library/think/cache/driver/Redis.php @@ -204,7 +204,7 @@ public function clear($tag = null) { if ($tag) { // 指定标签清除 - $keys = $this->getTagItems($tag); + $keys = $this->getTagItem($tag); $this->handler->del($keys); diff --git a/library/think/cache/driver/Wincache.php b/library/think/cache/driver/Wincache.php index edc4dba5f7..ef15784173 100644 --- a/library/think/cache/driver/Wincache.php +++ b/library/think/cache/driver/Wincache.php @@ -166,10 +166,10 @@ public function clear($tag = null) $tagName = $this->getTagkey($tag); $this->rm($tagName); return true; - } else { - $this->writeTimes++; - return wincache_ucache_clear(); } + + $this->writeTimes++; + return wincache_ucache_clear(); } } diff --git a/library/think/cache/driver/Xcache.php b/library/think/cache/driver/Xcache.php index 28a5e373dd..4e698597a5 100644 --- a/library/think/cache/driver/Xcache.php +++ b/library/think/cache/driver/Xcache.php @@ -163,6 +163,7 @@ public function clear($tag = null) foreach ($keys as $key) { xcache_unset($key); } + $this->rm($this->getTagKey($tag)); return true; }