diff --git a/src/Module/Admin/Page/PageController.php b/src/Module/Admin/Page/PageController.php index 5b58062a..31eaf1a3 100644 --- a/src/Module/Admin/Page/PageController.php +++ b/src/Module/Admin/Page/PageController.php @@ -140,7 +140,7 @@ public function savePage( $repository->save($item); // Cache - $pageBuilder->renderByEntityAndCache($entity); + $pageBuilder->renderByEntityAndCache($entity, true); return [ 'item' => $entity, diff --git a/src/PageBuilder/PageBuilder.php b/src/PageBuilder/PageBuilder.php index 45ac790d..e13f96f3 100644 --- a/src/PageBuilder/PageBuilder.php +++ b/src/PageBuilder/PageBuilder.php @@ -70,11 +70,11 @@ public function renderPage(array $rows): string return $html; } - public function renderByEntityAndCache(Page $page): string + public function renderByEntityAndCache(Page $page, bool $refresh = false): string { $cache = $this->getCacheFile($page->getId()); - if ($cache->isFile()) { + if ($cache->isFile() && !$refresh) { return (string) $cache->read(); }