]> git.mxchange.org Git - friendica.git/commitdiff
Fix unexpected return value of RedisCache->delete()
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 9 Aug 2020 13:19:15 +0000 (09:19 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 9 Aug 2020 14:45:06 +0000 (10:45 -0400)
- Address https://github.com/friendica/friendica/issues/8876#issuecomment-671025374

src/Core/Cache/RedisCache.php

index 9a982fe040d39aac71c397b3fff785cb289da822..5dbb963882917d3be47bed7d0383380cb3b9993d 100644 (file)
@@ -139,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;
        }
 
        /**