From b92f605b66cd93b41256e0c1425cccdd36789a9c Mon Sep 17 00:00:00 2001 From: Christian Kuhn <lolli@schwarzbu.ch> Date: Mon, 2 Mar 2015 19:23:49 +0100 Subject: [PATCH] [TASK] Move cache configuration to DefaultConfiguration ext:fluid and ext:exbase configure additional caches in ext_localconf. Since both extensions are required and always loaded, those cache configurations are moved to ext:core DefaultConfiguration.php to have an easier life for admins who reconfigure those caches in LocalConfiguration. Resolves: #65467 Releases: master Change-Id: I63ac633f15d0a0774deffa3620d67a405af1e5df Reviewed-on: http://review.typo3.org/37468 Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org> Tested-by: Helmut Hummel <helmut.hummel@typo3.org> --- .../Configuration/DefaultConfiguration.php | 20 +++++++++++++++++++ typo3/sysext/extbase/ext_localconf.php | 16 --------------- typo3/sysext/fluid/ext_localconf.php | 11 ---------- .../Classes/Controller/AbstractController.php | 1 - 4 files changed, 20 insertions(+), 28 deletions(-) delete mode 100644 typo3/sysext/fluid/ext_localconf.php diff --git a/typo3/sysext/core/Configuration/DefaultConfiguration.php b/typo3/sysext/core/Configuration/DefaultConfiguration.php index 11973abe8f2a..0ddf96f34a7b 100644 --- a/typo3/sysext/core/Configuration/DefaultConfiguration.php +++ b/typo3/sysext/core/Configuration/DefaultConfiguration.php @@ -191,6 +191,11 @@ return array( ), 'groups' => array('system') ), + 'fluid_template' => array( + 'backend' => \TYPO3\CMS\Core\Cache\Backend\FileBackend::class, + 'frontend' => \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend::class, + 'groups' => array('system'), + ), 'extbase_object' => array( 'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class, 'backend' => \TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend::class, @@ -207,6 +212,21 @@ return array( ), 'groups' => array('system') ), + 'extbase_typo3dbbackend_tablecolumns' => array( + 'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class, + 'backend' => \TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend::class, + 'groups' => array('system'), + ), + 'extbase_typo3dbbackend_queries' => array( + 'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class, + 'backend' => \TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend::class, + 'groups' => array('system'), + ), + 'extbase_datamapfactory_datamap' => array( + 'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class, + 'backend' => \TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend::class, + 'groups' => array('system'), + ), ), ), 'defaultCategorizedTables' => 'pages,tt_content,sys_file_metadata', // List of comma separated tables that are categorizable by default. diff --git a/typo3/sysext/extbase/ext_localconf.php b/typo3/sysext/extbase/ext_localconf.php index fc11f33e18a6..946a78c92f44 100644 --- a/typo3/sysext/extbase/ext_localconf.php +++ b/typo3/sysext/extbase/ext_localconf.php @@ -1,22 +1,6 @@ <?php defined('TYPO3_MODE') or die(); -if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_typo3dbbackend_tablecolumns'])) { - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_typo3dbbackend_tablecolumns'] = array( - 'groups' => array('system') - ); -} -if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_typo3dbbackend_queries'])) { - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_typo3dbbackend_queries'] = array( - 'groups' => array('system') - ); -} -if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_datamapfactory_datamap'])) { - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_datamapfactory_datamap'] = array( - 'groups' => array('system') - ); -} - // We set the default implementation for Storage Backend & Query Settings in Backend and Frontend. // The code below is NO PUBLIC API! /** @var $extbaseObjectContainer \TYPO3\CMS\Extbase\Object\Container\Container */ diff --git a/typo3/sysext/fluid/ext_localconf.php b/typo3/sysext/fluid/ext_localconf.php deleted file mode 100644 index 0ade0ae51abb..000000000000 --- a/typo3/sysext/fluid/ext_localconf.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php -defined('TYPO3_MODE') or die(); - -// Register caches if not already done in localconf.php or a previously loaded extension. -if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['fluid_template'])) { - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['fluid_template'] = array( - 'backend' => \TYPO3\CMS\Core\Cache\Backend\FileBackend::class, - 'frontend' => \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend::class, - 'groups' => array('system') - ); -} diff --git a/typo3/sysext/install/Classes/Controller/AbstractController.php b/typo3/sysext/install/Classes/Controller/AbstractController.php index b83ee60a48c5..d832dbdca8a4 100644 --- a/typo3/sysext/install/Classes/Controller/AbstractController.php +++ b/typo3/sysext/install/Classes/Controller/AbstractController.php @@ -415,7 +415,6 @@ class AbstractController { } require(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('extbase') . 'ext_localconf.php'); - require(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('fluid') . 'ext_localconf.php'); $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_datamapfactory_datamap']['backend'] = \TYPO3\CMS\Core\Cache\Backend\NullBackend::class; -- GitLab