From 43d37f1a852aa84491224d90e824d33e734b42ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Wolda=C5=84ski?= Date: Tue, 22 Feb 2022 18:30:54 +0100 Subject: [PATCH 1/2] [BUGFIX] add constant header to inform what to cache on frontend side --- Classes/Middleware/CacheHeaders.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Classes/Middleware/CacheHeaders.php b/Classes/Middleware/CacheHeaders.php index 73da7fe..324feb8 100644 --- a/Classes/Middleware/CacheHeaders.php +++ b/Classes/Middleware/CacheHeaders.php @@ -18,14 +18,12 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface $tsfe = $GLOBALS['TSFE'] ?? null; if ($tsfe instanceof TypoScriptFrontendController) { - if ($tsfe->isStaticCacheble()) { - $response = $response->withAddedHeader('X', 'cache'); - } - $tags[] = 'T3'; $tags[] = 'PAGE-' . $tsfe->id; $tags = implode(' ', $tags); + + $response = $response->withAddedHeader('X-TYPO3-caching', $tsfe->isStaticCacheble() ? 'cache' : 'no-cache'); $response = $response->withAddedHeader('X-Tags', $tags); } From 7b83a20a2046cadec393660e5fafb7149cc9c9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Wolda=C5=84ski?= Date: Tue, 22 Feb 2022 18:32:45 +0100 Subject: [PATCH 2/2] [BUGFIX] add constant header to inform what to cache on frontend side - bump version --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index 11777c4..f79c527 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -4,7 +4,7 @@ 'title' => 'Cache Purger', 'description' => 'Purge cached URLs within Varnish instances', 'category' => 'misc', - 'version' => '1.0.2', + 'version' => '1.0.3', 'state' => 'stable', 'clearCacheOnLoad' => 0, 'constraints' => [