log errors storing persistance

This commit is contained in:
El RIDO
2021-06-16 05:32:45 +02:00
parent 3d9ba10fcb
commit fd08d991fe
3 changed files with 11 additions and 4 deletions

View File

@@ -73,7 +73,10 @@ class PurgeLimiter extends AbstractPersistence
if ($pl + self::$_limit >= $now) {
return false;
}
self::$_store->setValue((string) $now, 'purge_limiter');
return true;
$hasStored = self::$_store->setValue((string) $now, 'purge_limiter');
if (!$hasStored) {
error_log('failed to store the purge limiter, skipping purge cycle to avoid getting stuck in a purge loop');
}
return $hasStored;
}
}