cache : improve cache system
This commit is contained in:
parent
8c749030ba
commit
e28d59ad30
1 changed files with 4 additions and 2 deletions
|
|
@ -6,12 +6,14 @@ class ProjectPage extends NotificationsPage {
|
||||||
public function getStepsFromCache() {
|
public function getStepsFromCache() {
|
||||||
$apiCache = kirby()->cache('api');
|
$apiCache = kirby()->cache('api');
|
||||||
$stepsData = $apiCache->get($this->slug() . '_' . 'steps');
|
$stepsData = $apiCache->get($this->slug() . '_' . 'steps');
|
||||||
if (!$stepsData) {
|
|
||||||
$steps = $newPage->getRefreshedSteps(true);
|
if ($stepsData === null) {
|
||||||
|
$steps = $this->getRefreshedSteps(true);
|
||||||
|
|
||||||
refreshProjectStepsCache($this, $steps);
|
refreshProjectStepsCache($this, $steps);
|
||||||
return $steps;
|
return $steps;
|
||||||
};
|
};
|
||||||
|
|
||||||
return $stepsData;
|
return $stepsData;
|
||||||
}
|
}
|
||||||
public function getRefreshedSteps() {
|
public function getRefreshedSteps() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue