fix: remove unnecessary calls to purgeCache (#3502)

This commit is contained in:
Dag 2023-07-06 18:52:19 +02:00 committed by GitHub
parent 965d7d44c5
commit 5e22459eb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 19 deletions

View file

@ -91,8 +91,9 @@ class DisplayAction implements ActionInterface
$cache = $cacheFactory->create();
$cache->setScope('');
$cache->purgeCache(86400);
$cache->setKey($cache_params);
// This cache purge will basically delete all cache items older than 24h, regardless of scope and key
$cache->purgeCache(86400);
$items = [];
$infos = [];
@ -215,7 +216,7 @@ class DisplayAction implements ActionInterface
$cache = $cacheFactory->create();
$cache->setScope('error_reporting');
$cache->setkey([$bridgeName . '_' . $code]);
$cache->purgeCache(86400);
if ($report = $cache->loadData()) {
$report = Json::decode($report);
$report['time'] = time();