MDL-74072 cachestore_redis: Add error check for envoy proxy
This commit is contained in:
Vendored
+5
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user