[TASK] Move cache configuration to DefaultConfiguration 68/37468/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 2 Mar 2015 18:23:49 +0000 (19:23 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Mon, 2 Mar 2015 18:52:18 +0000 (19:52 +0100)
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>
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/extbase/ext_localconf.php
typo3/sysext/fluid/ext_localconf.php [deleted file]
typo3/sysext/install/Classes/Controller/AbstractController.php

index 11973ab..0ddf96f 100644 (file)
@@ -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.
index fc11f33..946a78c 100644 (file)
@@ -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 (file)
index 0ade0ae..0000000
+++ /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')
-       );
-}
index b83ee60..d832dbd 100644 (file)
@@ -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;