#99333Lazy cache clearing in \TYPO3\CMS\Extbase\Core\Bootstrap::clearCacheOnError()
Description
The Extbase setting enableAutomaticCacheClearing is enabled by default. It leads to clearing the cache when the errorAction() in an Extbase Controller is called.
In \TYPO3\CMS\Extbase\Mvc\Controller\ActionController::errorAction() the status code 400 is returned.
In \TYPO3\CMS\Extbase\Core\Bootstrap::handleFrontendRequest() this leads to clearing the cache for the current page.
if ($response->getStatusCode() === 400) {
$this->clearCacheOnError();
}
The lazy part is in \TYPO3\CMS\Extbase\Core\Bootstrap::clearCacheOnError(), here the page cache is cleared for the (whole) current page
$this->cacheService->clearPageCache([$GLOBALS['TSFE']->id]);
Given I’m on a “detail page” – imagine a news detail page, one page with many cache versions – the cache is cleared for all versions.
Better (correct) would be, to clear the page cache, based on a cache tag produced by \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::createHashBase()
Reviews 1
History 01
-
Gerrit Code Review pushed patch set 1 for main to change 96579 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-09T19:42:57+00:00" > 10/09/26, 19:42 </span>