Deprecation: #102422 - TypoScriptFrontendController->addCacheTags() and ->getPageCacheTags()
See forge#102422
Description
The methods \TYPO3\
and
\TYPO3\
have been marked as deprecated.
Impact
Calling the methods
\TYPO3\
and
\TYPO3\
will trigger a PHP deprecation warning.
Affected installations
TYPO3 installations calling
\TYPO3\
or
\TYPO3\
.
Migration
// Before
$GLOBALS['TSFE']->addCacheTags([
'tx_myextension_mytable_123',
'tx_myextension_mytable_456'
]);
// After
use TYPO3\CMS\Core\Cache\CacheTag;
$request->getAttribute('frontend.cache.collector')->addCacheTags(
new CacheTag('tx_myextension_mytable_123', 3600),
new CacheTag('tx_myextension_mytable_456', 3600)
);
Copied!
// Before
$GLOBALS['TSFE']->getPageCacheTags();
// After
$request->getAttribute('frontend.cache.collector')->getCacheTags();
Copied!