mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-74072 cachestore_redis: Add error check for envoy proxy
This commit is contained in:
parent
9cd77c4130
commit
25a6a42477
6
cache/stores/redis/lib.php
vendored
6
cache/stores/redis/lib.php
vendored
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user