mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-63127 cachestore_redis: delegate functionality to specific areas
These functions should not have to worry about compression logic.
This commit is contained in:
parent
ac19c888b0
commit
54a659a5bd
8
cache/stores/redis/lib.php
vendored
8
cache/stores/redis/lib.php
vendored
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user