summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-05-16 10:10:25 -0500
committerGitHub <noreply@github.com>2017-05-16 10:10:25 -0500
commit78e6c2dea417f17db52648f6819ab20889e2554c (patch)
tree2c64ca14e90a276338e41fc76061b90854c48c61 /lib
parent15f7fe022b222cdc080719d8585df29c8259053a (diff)
parent0e66c2a38aa86df2b6a1273b0cf4ad95485ce6e7 (diff)
downloadnextcloud-server-78e6c2dea417f17db52648f6819ab20889e2554c.tar.gz
nextcloud-server-78e6c2dea417f17db52648f6819ab20889e2554c.zip
Merge pull request #4666 from nextcloud/enable-redis-cluster
Add redis cluster tests to our CI jobs
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Memcache/Redis.php10
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;
}
/**