From: Philipp Holzer Date: Mon, 4 Mar 2019 20:00:41 +0000 (+0100) Subject: Fixing redis cachekey X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3e53dab817c4ab39c53a74238bfbc42c76d1b806;p=friendica.git Fixing redis cachekey --- diff --git a/src/Core/Cache/RedisCacheDriver.php b/src/Core/Cache/RedisCacheDriver.php index fcbfab548a..55dc09156a 100644 --- a/src/Core/Cache/RedisCacheDriver.php +++ b/src/Core/Cache/RedisCacheDriver.php @@ -2,9 +2,8 @@ namespace Friendica\Core\Cache; -use Friendica\Core\Cache; - use Exception; +use Friendica\Core\Cache; use Redis; /** @@ -145,7 +144,7 @@ class RedisCacheDriver extends AbstractCacheDriver implements IMemoryCacheDriver $this->redis->watch($cachekey); // If the old value isn't what we expected, somebody else changed the key meanwhile - if ($this->get($key) === $oldValue) { + if ($this->get($cachekey) === $oldValue) { if ($ttl > 0) { $result = $this->redis->multi() ->setex($cachekey, $ttl, $newCached) @@ -170,7 +169,7 @@ class RedisCacheDriver extends AbstractCacheDriver implements IMemoryCacheDriver $this->redis->watch($cachekey); // If the old value isn't what we expected, somebody else changed the key meanwhile - if ($this->get($key) === $value) { + if ($this->get($cachekey) === $value) { $result = $this->redis->multi() ->del($cachekey) ->exec();