MDL-74072 cachestore_redis: Add error check for envoy proxy

This commit is contained in:
Tomo Tsuyuki 2022-03-03 17:16:52 +11:00
parent 9cd77c4130
commit 25a6a42477

View File

@ -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 {