diff --git a/cache/stores/redis/lib.php b/cache/stores/redis/lib.php index 4ce7580ce63..8f80704f36f 100644 --- a/cache/stores/redis/lib.php +++ b/cache/stores/redis/lib.php @@ -680,7 +680,11 @@ class cachestore_redis extends cache_store implements cache_is_key_aware, cache_ * @return int|null Memory used by Redis or null if we don't know */ public function store_total_size(): ?int { - $details = $this->redis->info('MEMORY'); + try { + $details = $this->redis->info('MEMORY'); + } catch (\RedisException $e) { + return null; + } if (empty($details['used_memory'])) { return null; } else {