diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Memcache/Redis.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/private/Memcache/Redis.php b/lib/private/Memcache/Redis.php index a154d08deca..dd7e929a828 100644 --- a/lib/private/Memcache/Redis.php +++ b/lib/private/Memcache/Redis.php @@ -79,12 +79,10 @@ class Redis extends Cache implements IMemcacheTTL { public function clear($prefix = '') { $prefix = $this->getNameSpace() . $prefix . '*'; - $it = null; - self::$cache->setOption(\Redis::OPT_SCAN, \Redis::SCAN_RETRY); - while ($keys = self::$cache->scan($it, $prefix)) { - self::$cache->del($keys); - } - return true; + $keys = self::$cache->keys($prefix); + $deleted = self::$cache->del($keys); + + return count($keys) === $deleted; } /** |