Skip to content

Commit

Permalink
[BUGFIX] Fix default cache-config (remove deprecated "cache_" prefix …
Browse files Browse the repository at this point in the history
…in cache-configuration)
  • Loading branch information
Jürgen Kußmann committed Nov 15, 2023
1 parent 3702fcc commit dc9fe84
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,9 @@
/**
* register cache which can cache response of REST-endpoints
*/
if (false === isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_restler'])) {
// @TODO TYPO3 v12:
// In TYPO3 v12, it's NOT allowed, that the cache-configuration contains the prefix 'cache_', so we must change
// the cache-configuration-name from 'cache_restler' to just 'restler'. We didn't changed this for TYPO3 v10/v11,
// because 3rd-party-extensions maybe override the current cache-configuration-name 'cache_restler'.

if (false === isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['restler'])) {
// only configure cache, when cache is not already configured (e.g. by any other extension which base on this extension)
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_restler'] = [
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['restler'] = [
'frontend' => VariableFrontend::class,
'backend' => Typo3DatabaseBackend::class,
'options' => ['defaultLifetime' => 0]
Expand Down

0 comments on commit dc9fe84

Please sign in to comment.