cache : improve cache system

This commit is contained in:
isUnknown 2025-05-26 14:14:52 +02:00
parent 8c749030ba
commit e28d59ad30

View file

@ -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() {