Skip to content

Commit 5b55945

Browse files
committed
if url is changed and page is published then empty cache
1 parent 0dc2da4 commit 5b55945

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Helper/PageHelper.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ public function makePageSnapshot(PageInterface $page)
230230
$snapshotContentRoute->setPath(self::getPageRoutePath($page->getPath()));
231231
$snapshotContentRoute->setObjectId($pageSnapshot->getId());
232232

233+
if($oldPageSnapshot && ($oldPageSnapshot->getPath() != self::getPageRoutePath($page->getPath()))){
234+
/** @var \Networking\InitCmsBundle\Lib\PhpCacheInterface $phpCache */
235+
$phpCache = $this->getService('networking_init_cms.lib.php_cache');
236+
$phpCache->clean();
237+
}
238+
233239
$em->persist($snapshotContentRoute);
234240
$em->flush();
235241
}

0 commit comments

Comments
 (0)