With #88366 "cache_" prefix has been deprecated. However, when
retrieving a deprecated cache like "cache_subject" its identifier
gets transformed to just "subject" which is (probably) not available
in cache configuration keys. That's why keys of cache configurations
have to be transformed as well.
Resolves: #88512
Releases: master
Change-Id: I224d55e71011a437ed2e990d13b1edbee08770b7
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60892
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
if (!is_array($configuration)) {
throw new \InvalidArgumentException('The cache configuration for cache "' . $identifier . '" was not an array as expected.', 1231259656);
}
+ // Fallback layer, will be removed in TYPO3 v11.0.
+ if (strpos($identifier, 'cache_') === 0) {
+ trigger_error('Accessing a cache with the "cache_" prefix as in "' . $identifier . '" is not necessary anymore, and should be called without the cache prefix.', E_USER_DEPRECATED);
+ $identifier = substr($identifier, 6);
+ }
$this->cacheConfigurations[$identifier] = $configuration;
}
}