Skip to content
Snippets Groups Projects
Commit c3117f4e authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #4700 from nextcloud/redis-cluster-compatibility

Compatibility with Redis and RedisCluster
parents fb3ac329 7f46898d
No related branches found
No related tags found
No related merge requests found
...@@ -70,7 +70,7 @@ class Redis extends Cache implements IMemcacheTTL { ...@@ -70,7 +70,7 @@ class Redis extends Cache implements IMemcacheTTL {
} }
public function remove($key) { public function remove($key) {
if (self::$cache->delete($this->getNameSpace() . $key)) { if (self::$cache->del($this->getNameSpace() . $key)) {
return true; return true;
} else { } else {
return false; return false;
...@@ -82,7 +82,7 @@ class Redis extends Cache implements IMemcacheTTL { ...@@ -82,7 +82,7 @@ class Redis extends Cache implements IMemcacheTTL {
$it = null; $it = null;
self::$cache->setOption(\Redis::OPT_SCAN, \Redis::SCAN_RETRY); self::$cache->setOption(\Redis::OPT_SCAN, \Redis::SCAN_RETRY);
while ($keys = self::$cache->scan($it, $prefix)) { while ($keys = self::$cache->scan($it, $prefix)) {
self::$cache->delete($keys); self::$cache->del($keys);
} }
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment