Compatibility with Redis and RedisCluster

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-05-04 12:42:58 -03:00
parent 7bb63d6a4d
commit 7f46898dad
1 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ class Redis extends Cache implements IMemcacheTTL {
}
public function remove($key) {
if (self::$cache->delete($this->getNameSpace() . $key)) {
if (self::$cache->del($this->getNameSpace() . $key)) {
return true;
} else {
return false;
@ -82,7 +82,7 @@ class Redis extends Cache implements IMemcacheTTL {
$it = null;
self::$cache->setOption(\Redis::OPT_SCAN, \Redis::SCAN_RETRY);
while ($keys = self::$cache->scan($it, $prefix)) {
self::$cache->delete($keys);
self::$cache->del($keys);
}
return true;
}