From 54a659a5bd99f22ffc339849ffaadb79deaec71b Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Sat, 14 Sep 2019 19:49:19 +0200 Subject: [PATCH] MDL-63127 cachestore_redis: delegate functionality to specific areas These functions should not have to worry about compression logic. --- cache/stores/redis/lib.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cache/stores/redis/lib.php b/cache/stores/redis/lib.php index d8282eead75..680066d8c1e 100644 --- a/cache/stores/redis/lib.php +++ b/cache/stores/redis/lib.php @@ -261,10 +261,6 @@ class cachestore_redis extends cache_store implements cache_is_key_aware, cache_ public function get($key) { $value = $this->redis->hGet($this->hash, $key); - if ($this->compressor == self::COMPRESSOR_NONE) { - return $value; - } - return $this->uncompress($value); } @@ -277,10 +273,6 @@ class cachestore_redis extends cache_store implements cache_is_key_aware, cache_ public function get_many($keys) { $values = $this->redis->hMGet($this->hash, $keys); - if ($this->compressor == self::COMPRESSOR_NONE) { - return $values; - } - foreach ($values as &$value) { $value = $this->uncompress($value); }