diff --git a/Classes/Utility/IsCacheableUtility.php b/Classes/Utility/IsCacheableUtility.php index 8e5fe05..056182d 100644 --- a/Classes/Utility/IsCacheableUtility.php +++ b/Classes/Utility/IsCacheableUtility.php @@ -15,10 +15,6 @@ */ class IsCacheableUtility { - public function __construct(private readonly Context $context) - { - } - public function usePageCache(?TypoScriptFrontendController $typoScriptFrontendController = null, bool $usePageCache = true): bool { if (!$usePageCache) { @@ -30,7 +26,7 @@ public function usePageCache(?TypoScriptFrontendController $typoScriptFrontendCo return $usePageCache; } - $context = $this->context; + $context = GeneralUtility::makeInstance(Context::class); assert($context instanceof Context); $backendUserContext = $context->getAspect('backend.user'); if ($backendUserContext->isLoggedIn()) {