X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fdoctrine%2Fcache%2Flib%2FDoctrine%2FCommon%2FCache%2FRedisCache.php;fp=vendor%2Fdoctrine%2Fcache%2Flib%2FDoctrine%2FCommon%2FCache%2FRedisCache.php;h=3ea51d507a5c4bb38f1e0d03c22dcc539fb86c20;hb=5e458ff8cb4924fd5fa03b80d8edfcc52fe43479;hp=22add6679b85aed2d602d85ac221552f59ccea97;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php index 22add6679..3ea51d507 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php @@ -74,7 +74,7 @@ class RedisCache extends CacheProvider $fetchedItems = array_combine($keys, $this->redis->mget($keys)); // Redis mget returns false for keys that do not exist. So we need to filter those out unless it's the real data. - $foundItems = array(); + $foundItems = []; foreach ($fetchedItems as $key => $value) { if (false !== $value || $this->redis->exists($key)) { @@ -135,6 +135,14 @@ class RedisCache extends CacheProvider return $this->redis->delete($id) >= 0; } + /** + * {@inheritdoc} + */ + protected function doDeleteMultiple(array $keys) + { + return $this->redis->delete($keys) >= 0; + } + /** * {@inheritdoc} */ @@ -149,13 +157,13 @@ class RedisCache extends CacheProvider protected function doGetStats() { $info = $this->redis->info(); - return array( + return [ Cache::STATS_HITS => $info['keyspace_hits'], Cache::STATS_MISSES => $info['keyspace_misses'], Cache::STATS_UPTIME => $info['uptime_in_seconds'], Cache::STATS_MEMORY_USAGE => $info['used_memory'], Cache::STATS_MEMORY_AVAILABLE => false - ); + ]; } /** @@ -167,10 +175,6 @@ class RedisCache extends CacheProvider */ protected function getSerializerValue() { - if (defined('HHVM_VERSION')) { - return Redis::SERIALIZER_PHP; - } - if (defined('Redis::SERIALIZER_IGBINARY') && extension_loaded('igbinary')) { return Redis::SERIALIZER_IGBINARY; }