Task #86353
closedEpic #83968: PSR-11 Initiative
Deprecate CacheManager usage in ext_localconf.php
100%
Description
CacheManager has a design problem:
The CacheManager is used to create the core_cache. That core_cache
is used to read the (possibly) cached CacheManager configuration,
which is then used to configure the arealdy-in-use CacheManager.
That means the initialization sequence currently is like:
new CacheManager(!$failsafe) | setInitialCacheConfiguration() | loadExtLocalconf() | setFinalCachingFrameworkConfiguration()
Between initial creation of the CacheManager and
setFinalCachingFrameworkConfiguration() the CacheManager is in a limbo
state, as it may already be used to create a cache although the final
configuration (which may be configured in ext_localconf.php) for that
cache has not been set. The final configuration (for that created cache)
will then be ignored, as the cache has already been created.
In v10 the sequence should be changed to:
$coreCache = createCoreCache() | loadExtLocalconf | new CacheManager(!$failsafe, $cachingConfiguration, $coreCache);
We should delay CacheManager until ext_localconf.php has been loaded
(maybe also after baseTca loading) in v10.
Therefore GeneralUtility::makeInstance(CacheManager::class) usage in
ext_localconf.php needs to be deprecated.