From f86bf6fdfdcc52302d68c778c91b9f73d9af70d2 Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 7 Nov 2024 13:59:53 +0200 Subject: [PATCH] updates --- app/controllers/shared/api.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 7d9c4f1c43..f5921bf6e8 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -754,13 +754,10 @@ App::shutdown() Authorization::skip(fn () => $dbForProject->updateDocument('cache', $cacheLog->getId(), $cacheLog)); } - $cache = new Cache( - new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId()) - ); - - $timestamp = 60 * 60 * 24 * 30; - $cacheFile = $cache->load($key, $timestamp); - if ($signature !== $cacheLog->getAttribute('signature') || empty($cacheFile)) { + if ($signature !== $cacheLog->getAttribute('signature')) { + $cache = new Cache( + new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId()) + ); $cache->save($key, $data['payload']); } }