From e28d59ad303e42407676834f7d1f7188381b7a98 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Mon, 26 May 2025 14:14:52 +0200 Subject: [PATCH] cache : improve cache system --- public/site/models/project.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/site/models/project.php b/public/site/models/project.php index 8adf0c6..2c4b180 100644 --- a/public/site/models/project.php +++ b/public/site/models/project.php @@ -6,12 +6,14 @@ class ProjectPage extends NotificationsPage { public function getStepsFromCache() { $apiCache = kirby()->cache('api'); $stepsData = $apiCache->get($this->slug() . '_' . 'steps'); - if (!$stepsData) { - $steps = $newPage->getRefreshedSteps(true); + + if ($stepsData === null) { + $steps = $this->getRefreshedSteps(true); refreshProjectStepsCache($this, $steps); return $steps; }; + return $stepsData; } public function getRefreshedSteps() {