From 19064c3af54f3b6b5d869f3f8f40bd6f5dd97f7c Mon Sep 17 00:00:00 2001 From: "kai.lorenz" Date: Tue, 14 Mar 2017 17:52:41 +0100 Subject: [PATCH] [BUGFIX] reset backPath after varnish cache flush #18 --- Classes/Hooks/Cache.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Classes/Hooks/Cache.php b/Classes/Hooks/Cache.php index 20e945f..3d9a917 100644 --- a/Classes/Hooks/Cache.php +++ b/Classes/Hooks/Cache.php @@ -27,6 +27,8 @@ use Mittwald\Varnishcache\Service\VarnishCacheService; use TYPO3\CMS\Core\DataHandling\DataHandler; +use TYPO3\CMS\Core\Page\PageRenderer; +use TYPO3\CMS\Core\Utility\GeneralUtility; /** @@ -66,6 +68,10 @@ public function clearCachePostProc(array &$params, DataHandler $dataHandler) { foreach ($params['pageIdArray'] as $pageId) { $this->getVarnishCacheService()->flushCache($pageId); } + + $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class); + $pageRenderer->setBackPath(NULL); + return; }