Skip to content
Snippets Groups Projects
Commit 972df083 authored by Oliver Hader's avatar Oliver Hader Committed by Andreas Fernandez
Browse files

[BUGFIX] Remove "cache_" prefix from cache configuration keys

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: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent b5539e3d
Branches
Tags
No related merge requests found
......@@ -95,6 +95,11 @@ class CacheManager implements SingletonInterface
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;
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment