Bug #22638
closed[Caching framework] Remove default settings for cache configuration
0%
Description
The following patch will be committed in 72 hours if nobody objects
Type: bugfix, cleanup
BT:
Branches: trunk, 4.4
Problem:
The cache manager has some logic to fall back to default frontend and backend definitions if caches are initialized, but not fully defined:
- While these settings might make sense for FLOW3, they are not usefull for v4. In v4 all caches should be defined in TYPO3_CONF_VARS.
- The defaults are of very limited use, it's usually not possible to change a frontend for a cache, and most backends require additional options.
- The defaults are only used in t3lib_cache_manager initialize(), with additionally doesn't use the defined defaultFrontend / defaultBackend settings from TYPO3_CONF_VARS, but own class internal definitions. The method is not used in the core, and it must not be used by an extension.
Solution:
- Remove defaultFrontend / defaultBackend definition from TYPO3_CONF_VARS (not used throughout the core)
- Remove default definitions in t3lib_cache_manager
- Remove default usage in initialize() of t3lib_cache_manager
- Adapt a unit test
Notes:
I don't expect any problems with this as the code is not in use anyway.
(issue imported from #M15388)
Files
Updated by Karsten Dambekalns over 14 years ago
For FLOW3 this indeed makes sense. It makes it possible to leave out settings for caches, if the default should be used, and it actually uses the defaults defined in the configuration in favor of the values in the class.
Thus one can switch the default backend from file to memcache with a single configuration change.