X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FCache%2FRedisCache.php;h=5dbb963882917d3be47bed7d0383380cb3b9993d;hb=017a57cf1e2b7db6bed4abf7167b4086af73311c;hp=2a09a4818e7eef0e196747ffcb2ff8d01030c3f3;hpb=c742c62f0aae6a033823dd34ae97426dc90e7580;p=friendica.git diff --git a/src/Core/Cache/RedisCache.php b/src/Core/Cache/RedisCache.php index 2a09a4818e..5dbb963882 100644 --- a/src/Core/Cache/RedisCache.php +++ b/src/Core/Cache/RedisCache.php @@ -1,17 +1,33 @@ . + * + */ namespace Friendica\Core\Cache; use Exception; use Friendica\Core\BaseCache; -use Friendica\Core\Config\IConfiguration; +use Friendica\Core\Config\IConfig; use Redis; /** * Redis Cache. This driver is based on Memcache driver - * - * @author Hypolite Petovan - * @author Roland Haeder */ class RedisCache extends BaseCache implements IMemoryCache { @@ -23,7 +39,7 @@ class RedisCache extends BaseCache implements IMemoryCache /** * @throws Exception */ - public function __construct(string $hostname, IConfiguration $config) + public function __construct(string $hostname, IConfig $config) { if (!class_exists('Redis', false)) { throw new Exception('Redis class isn\'t available'); @@ -123,7 +139,9 @@ class RedisCache extends BaseCache implements IMemoryCache public function delete($key) { $cachekey = $this->getCacheKey($key); - return ($this->redis->del($cachekey) > 0); + $this->redis->del($cachekey); + // Redis doesn't have an error state for del() + return true; } /**