The change to cache/stores/redis/lib.php in commit 4fbf34b73d3fb returns an empty array in case of not found.
But perĀ \core_cache\helper::result_found(), only false is considered not found.
This results in logic dependent on no found result being incorrectly skipped.
(MOODLE_405_STABLE)~/dev/mdl$ git show 4fbf34b73d3fb -- cache/stores/redis/lib.php
|
|
diff --git a/cache/stores/redis/lib.php b/cache/stores/redis/lib.php
|
index 5c469056d85..7e3145324da 100644
|
--- a/cache/stores/redis/lib.php
|
+++ b/cache/stores/redis/lib.php
|
@@ -384,7 +384,7 @@ class cachestore_redis extends cache_store implements cache_is_key_aware, cache_
|
* @return array An array of the values of the given keys.
|
*/
|
public function get_many($keys) {
|
- $values = $this->redis->hMGet($this->hash, $keys);
|
+ $values = $this->redis->hMGet($this->hash, $keys) ?: [];
|
|
if ($this->compressor == self::COMPRESSOR_NONE) {
|
return $values;
|
cache/classes/helper.php
|
|
public static function result_found($value): bool {
|
return $value !== false;
|
}
|