[!!!][FEATURE] Improve caching framework by introducing groups 29/26829/8
authorBenjamin Mack <benni@typo3.org>
Wed, 15 Jan 2014 09:22:35 +0000 (10:22 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Wed, 15 Jan 2014 20:38:04 +0000 (21:38 +0100)
The current TYPO3 Core includes different types of caches. There are
system-related caches (class loading cache, configuration cache,
l10n_cache, extbase_object, extbase_reflection etc.) and
frontend-related caches (chash cache, page cache, page section
cache).

The patch introduces the possibility to group caches. The core uses
two groups "pages" with all page-related caches, and "system" that
is used for compile-time caches and configuration caches.

The new API is now used to be more flexible inside DataHandler
clear_cacheCmd without having hooks, as the Cache Manager is used
to clear all caches inside one hook.

!!! The "Clear all caches" command does not flush caches for
system-related caches anymore. Only "Clear Configuration Cache" or
inside the install tool in the backend removes all the system caches.

A new userTSconfig option is used to non-admins to be allowed to
clear the system caches.

Resolves: #54991
Releases: 6.2
Change-Id: Ie0fe134102882a1fcc5a85a0199016cdfbda08bf
Reviewed-on: https://review.typo3.org/26829
Reviewed-by: Helmut Hummel
Reviewed-by: Wouter Wolters
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Tested-by: Helmut Hummel
13 files changed:
NEWS.md
typo3/sysext/core/Classes/Cache/CacheManager.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Tests/Unit/Utility/ExtensionManagementUtilityTest.php
typo3/sysext/dbal/ext_localconf.php
typo3/sysext/extbase/ext_localconf.php
typo3/sysext/extensionmanager/Classes/Utility/ConfigurationUtility.php
typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php
typo3/sysext/fluid/ext_localconf.php
typo3/sysext/install/Classes/Service/SqlExpectedSchemaService.php
typo3/sysext/workspaces/ext_localconf.php

diff --git a/NEWS.md b/NEWS.md
index cb2d7ab..e0a818b 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -54,6 +54,22 @@ be used multiple times on the same table to add more than one category field.
 The options array (the fourth parameter) now can contain a 'label' to set a
 custom label for each category field.
 
+
+#### Caching
+
+* Caching behaviour by newly introduced grouping parameter
+
+Most caches used in TYPO3 CMS are now based on the FLOW caching framework. The
+caching framework is now used for class loading, Extbase-internals, most page-
+related caches, and for the configuration cache. Some caches are system-related
+caches that only need to be flushed and rebuilt when the core is updated or
+an extension is (un-)installed. **The functionality of "Clear all caches" thus
+does not include the system-related caches anymore** - these can be cleared by
+"Clear configuration cache" or DataHandler->clear_cacheCmd('system') if the
+user has the according permissions. Each cache can be configured to be in one or
+multiple groups in its configuration parameters. Custom groups can be defined
+and cleared manually.
+
 ### Frontend
 
 * Minor API change in \TYPO3\CMS\Frontend\ContentObjectRenderer->getTreeList()
index 469d499..a045a25 100644 (file)
@@ -50,12 +50,23 @@ class CacheManager implements \TYPO3\CMS\Core\SingletonInterface {
        protected $cacheConfigurations = array();
 
        /**
+        * Used to flush caches of a specific group
+        * is an associative array containing the group identifier as key
+        * and the identifier as an array within that group
+        * groups are set via the cache configurations of each cache.
+        *
+        * @var array
+        */
+       protected $cacheGroups = array();
+
+       /**
         * @var array Default cache configuration as fallback
         */
        protected $defaultCacheConfiguration = array(
                'frontend' => 'TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend',
                'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
-               'options' => array()
+               'options' => array(),
+               'groups' => array('all')
        );
 
        /**
@@ -150,6 +161,45 @@ class CacheManager implements \TYPO3\CMS\Core\SingletonInterface {
        }
 
        /**
+        * Flushes all registered caches of a specific group
+        *
+        * @param string $groupIdentifier
+        * @return void
+        * @api
+        */
+       public function flushCachesInGroup($groupIdentifier) {
+               $this->createAllCaches();
+               if (isset($this->cacheGroups[$groupIdentifier])) {
+                       foreach ($this->cacheGroups[$groupIdentifier] as $cacheIdentifier) {
+                               if (isset($this->caches[$cacheIdentifier])) {
+                                       $this->caches[$cacheIdentifier]->flush();
+                               }
+                       }
+               }
+       }
+
+       /**
+        * Flushes entries tagged by the specified tag of all registered
+        * caches of a specific group.
+        *
+        * @param string $groupIdentifier
+        * @param string $tag Tag to search for
+        * @return void
+        * @api
+        */
+       public function flushCachesInGroupByTag($groupIdentifier, $tag) {
+               $this->createAllCaches();
+               if (isset($this->cacheGroups[$groupIdentifier])) {
+                       foreach ($this->cacheGroups[$groupIdentifier] as $cacheIdentifier) {
+                               if (isset($this->caches[$cacheIdentifier])) {
+                                       $this->caches[$cacheIdentifier]->flushByTag($tag);
+                               }
+                       }
+               }
+       }
+
+
+       /**
         * Flushes entries tagged by the specified tag of all registered
         * caches.
         *
@@ -316,6 +366,20 @@ class CacheManager implements \TYPO3\CMS\Core\SingletonInterface {
                } else {
                        $backendOptions = $this->defaultCacheConfiguration['options'];
                }
+
+               // Add the cache identifier to the groups that it should be attached to, or use the default ones.
+               if (isset($this->cacheConfigurations[$identifier]['groups']) && is_array($this->cacheConfigurations[$identifier]['groups'])) {
+                       $assignedGroups = $this->cacheConfigurations[$identifier]['groups'];
+               } else {
+                       $assignedGroups = $this->defaultCacheConfiguration['groups'];
+               }
+               foreach ($assignedGroups as $groupIdentifier) {
+                       if (!isset($this->cacheGroups[$groupIdentifier])) {
+                               $this->cacheGroups[$groupIdentifier] = array();
+                       }
+                       $this->cacheGroups[$groupIdentifier][] = $identifier;
+               }
+
                $this->cacheFactory->create($identifier, $frontend, $backend, $backendOptions);
        }
 
index ed2bd0a..15fb978 100644 (file)
@@ -6484,13 +6484,13 @@ class DataHandler {
        /**
         * Unlink (delete) core cache files
         *
-        * @return integer The number of files deleted
-        * @deprecated since 6.0, will be removed in two versions, use \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::removeCacheFiles() instead
+        * @return void
+        * @deprecated since 6.0, will be removed in two versions, use the cache manager directly instead
         * @todo Define visibility
         */
        public function removeCacheFiles() {
                GeneralUtility::logDeprecatedFunction();
-               return \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::removeCacheFiles();
+               $GLOBALS['typo3CacheManager']->flushCachesInGroup('system');
        }
 
        /**
@@ -6931,31 +6931,38 @@ class DataHandler {
        /**
         * Clears the cache based on the command $cacheCmd.
         *
-        * $cacheCmd='pages':   Clears cache for all pages. Requires admin-flag to
-        * be set for BE_USER.
+        * $cacheCmd='pages'
+        * Clears cache for all pages and page-based caches inside the cache manager.
+        * Requires admin-flag to be set for BE_USER.
         *
-        * $cacheCmd='all':             Clears all cache_tables. This is necessary if
-        * templates are updated. Requires admin-flag to be set for BE_USER.
+        * $cacheCmd='all'
+        * Clears all cache_tables. This is necessary if templates are updated.
+        * Requires admin-flag to be set for BE_USER.
         *
-        * $cacheCmd=[integer]: Clears cache for the page pointed to by $cacheCmd
-        * (an integer).
+        * The following cache_* are intentionally not cleared by 'all'
         *
-        * $cacheCmd='cacheTag:[string]':  Flush page and pagesection cache by given tag
+        * - cache_md5params:   RDCT redirects.
+        * - cache_imagesizes:  Clearing this table would cause a lot of unneeded
+        * Imagemagick calls because the size informations have
+        * to be fetched again after clearing.
+        * - all caches inside the cache manager that are inside the group "system"
+        * - they are only needed to build up the core system and templates,
+        *   use "temp_cached" or "system" to do that
         *
-        * $cacheCmd='cacheId:[string]':  Removes cache identifier from page and page section cache
+        * $cacheCmd=[integer]
+        * Clears cache for the page pointed to by $cacheCmd (an integer).
+        *
+        * $cacheCmd='cacheTag:[string]'
+        * Flush page and pagesection cache by given tag
+        *
+        * $cacheCmd='cacheId:[string]'
+        * Removes cache identifier from page and page section cache
         *
         * Can call a list of post processing functions as defined in
         * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']
         * (numeric array with values being the function references, called by
         * GeneralUtility::callUserFunction()).
         *
-        * Note: The following cache_* are intentionally not cleared by
-        * $cacheCmd='all':
-        *
-        * - cache_md5params:   RDCT redirects.
-        * - cache_imagesizes:  Clearing this table would cause a lot of unneeded
-        * Imagemagick calls because the size informations have
-        * to be fetched again after clearing.
         *
         * @param string $cacheCmd The cache command, see above description
         * @return void
@@ -6968,19 +6975,20 @@ class DataHandler {
                switch (strtolower($cacheCmd)) {
                        case 'pages':
                                if ($this->admin || $this->BE_USER->getTSConfigVal('options.clearCache.pages')) {
-                                       $this->internal_clearPageCache();
+                                       $GLOBALS['typo3CacheManager']->flushCachesInGroup('pages');
                                }
                                break;
                        case 'all':
                                if ($this->admin || $this->BE_USER->getTSConfigVal('options.clearCache.all')) {
-                                       // Clear all caching framework caches
-                                       $GLOBALS['typo3CacheManager']->flushCaches();
+                                       // Clear cache group "all" of caching framework caches
+                                       $GLOBALS['typo3CacheManager']->flushCachesInGroup('all');
                                        if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cms')) {
                                                $GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cache_treelist');
                                        }
                                        // Clearing additional cache tables:
                                        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables'])) {
                                                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables'] as $tableName) {
+                                                       GeneralUtility::deprecationLog('Hook clearAllCache_additionalTables in DataHandler is deprecated in 6.2 and will be removed two versions later. Use the caching framework with database backend instead.');
                                                        if (!preg_match('/[^[:alnum:]_]/', $tableName) && substr($tableName, -5) === 'cache') {
                                                                $GLOBALS['TYPO3_DB']->exec_TRUNCATEquery($tableName);
                                                        } else {
@@ -6989,12 +6997,16 @@ class DataHandler {
                                                }
                                        }
                                }
-                               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::removeCacheFiles();
+
                                break;
                        case 'temp_cached':
-                               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::removeCacheFiles();
+                       case 'system':
+                               if ($this->admin || $this->BE_USER->getTSConfigVal('options.clearCache.system')) {
+                                       $GLOBALS['typo3CacheManager']->flushCachesInGroup('system');
+                               }
                                break;
                }
+
                $tagsToFlush = array();
                // Clear cache for a page ID!
                if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($cacheCmd)) {
@@ -7023,18 +7035,11 @@ class DataHandler {
                }
                // process caching framwork operations
                if (count($tagsToFlush) > 0) {
-                       /** @var $pageCache \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend */
-                       $pageCache = $GLOBALS['typo3CacheManager']->getCache('cache_pages');
-                       /** @var $pageSectionCache \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend */
-                       $pageSectionCache = $GLOBALS['typo3CacheManager']->getCache('cache_pagesection');
-                       /** @var $hashCache \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend */
-                       $hashCache = $GLOBALS['typo3CacheManager']->getCache('cache_hash');
                        foreach ($tagsToFlush as $tag) {
-                               $pageCache->flushByTag($tag);
-                               $pageSectionCache->flushByTag($tag);
-                               $hashCache->flushByTag($tag);
+                               $GLOBALS['typo3CacheManager']->flushCachesInGroupByTag('pages', $tag);
                        }
                }
+
                // Call post processing function for clear-cache:
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'])) {
                        $_params = array('cacheCmd' => strtolower($cacheCmd));
@@ -7148,11 +7153,11 @@ class DataHandler {
         *
         * @return void
         * @todo Define visibility
+        * @deprecated since TYPO3 CMS 6.2, remove two versions later. The DataHandler clearPageCache method is deprecated, use the cache manager directly.
         */
        public function internal_clearPageCache() {
-               if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cms')) {
-                       $GLOBALS['typo3CacheManager']->getCache('cache_pages')->flush();
-               }
+               GeneralUtility::logDeprecatedFunction();
+               $GLOBALS['typo3CacheManager']->flushCachesInGroup('pages');
        }
 
        /**
index b7a7f3c..70b579c 100644 (file)
@@ -1744,7 +1744,7 @@ tt_content.' . $key . $prefix . ' {
        }
 
        /**
-        * Remove cache files from php code cache, tagged with 'core'
+        * Remove cache files from php code cache, grouped by 'system'
         *
         * This removes the following cache entries:
         * - autoloader cache registry
@@ -1759,9 +1759,7 @@ tt_content.' . $key . $prefix . ' {
         * @return void
         */
        static public function removeCacheFiles() {
-               /** @var $codeCache \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend */
-               $codeCache = $GLOBALS['typo3CacheManager']->getCache('cache_core');
-               $codeCache->flush();
+               $GLOBALS['typo3CacheManager']->flushCachesInGroup('system');
        }
 
        /**
index 0586978..162bd72 100644 (file)
@@ -133,51 +133,68 @@ return array(
                                'cache_core' => array(
                                        'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\PhpFrontend',
                                        'backend' => 'TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend',
-                                       'options' => array()
+                                       'options' => array(
+                                               'defaultLifetime' => 0,
+                                       ),
+                                       'groups' => array('system')
                                ),
                                'cache_classes' => array(
                                        'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\StringFrontend',
                                        'backend' => 'TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend',
-                                       'options' => array()
+                                       'options' => array(
+                                               'defaultLifetime' => 0,
+                                       ),
+                                       'groups' => array('system')
                                ),
                                'cache_hash' => array(
                                        'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
                                        'backend' => 'TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend',
-                                       'options' => array()
+                                       'options' => array(),
+                                       'groups' => array('pages', 'all')
                                ),
                                'cache_pages' => array(
                                        'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
                                        'backend' => 'TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend',
                                        'options' => array(
                                                'compression' => TRUE
-                                       )
+                                       ),
+                                       'groups' => array('pages', 'all')
                                ),
                                'cache_pagesection' => array(
                                        'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
                                        'backend' => 'TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend',
                                        'options' => array(
                                                'compression' => TRUE
-                                       )
+                                       ),
+                                       'groups' => array('pages', 'all')
                                ),
                                'cache_phpcode' => array(
                                        'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\PhpFrontend',
                                        'backend' => 'TYPO3\CMS\Core\Cache\Backend\FileBackend',
-                                       'options' => array()
+                                       'options' => array(
+                                               'defaultLifetime' => 0,
+                                       ),
+                                       'groups' => array('system')
                                ),
                                'cache_runtime' => array(
                                        'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
                                        'backend' => 'TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend',
-                                       'options' => array()
+                                       'options' => array(),
+                                       'groups' => array()
                                ),
                                'cache_rootline' => array(
                                        'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
                                        'backend' => 'TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend',
-                                       'options' => array()
+                                       'options' => array(),
+                                       'groups' => array('pages', 'all')
                                ),
                                't3lib_l10n' => array(
                                        'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
                                        'backend' => 'TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend',
-                                       'options' => array(),
+                                       'options' => array(
+                                               'defaultLifetime' => 0,
+                                       ),
+                                       'groups' => array('system')
                                ),
                                'extbase_object' => array(
                                        'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
@@ -185,6 +202,7 @@ return array(
                                        'options' => array(
                                                'defaultLifetime' => 0,
                                        ),
+                                       'groups' => array('system')
                                ),
                                'extbase_reflection' => array(
                                        'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
@@ -192,6 +210,7 @@ return array(
                                        'options' => array(
                                                'defaultLifetime' => 0,
                                        ),
+                                       'groups' => array('system')
                                ),
                        ),
                ),
index d1b6d22..76bb529 100644 (file)
@@ -1037,17 +1037,9 @@ class ExtensionManagementUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
        /**
         * @test
         */
-       public function removeCacheFilesFlushesCache() {
-               $mockCache = $this->getMock(
-                       'TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend',
-                       array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'),
-                       array(),
-                       '',
-                       FALSE
-               );
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               $mockCache->expects($this->once())->method('flush');
+       public function removeCacheFilesFlushesSystemCaches() {
+               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('flushCachesInGroup'));
+               $GLOBALS['typo3CacheManager']->expects($this->once())->method('flushCachesInGroup')->with('system');
                ExtensionManagementUtility::removeCacheFiles();
        }
 
index 2d4458b..44c0c82 100644 (file)
@@ -10,6 +10,7 @@ $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Recordlist\\RecordLis
 // Register caches if not already done in localconf.php or a previously loaded extension.
 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['dbal'])) {
        $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['dbal'] = array(
-               'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\TransientMemoryBackend'
+               'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\TransientMemoryBackend',
+               'groups' => array()
        );
 }
index ec25f57..8b06fcf 100644 (file)
@@ -7,10 +7,14 @@ require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('extbas
 require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('extbase') . 'Classes/Utility/ExtensionUtility.php';
 
 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_typo3dbbackend_tablecolumns'])) {
-       $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_typo3dbbackend_tablecolumns'] = array();
+       $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_datamapfactory_datamap'])) {
-       $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_datamapfactory_datamap'] = array();
+       $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_datamapfactory_datamap'] = array(
+               'groups' => array('system')
+       );
 }
 
 // We need to set the default implementation for Storage Backend & Query Settings
index 1247e6f..4c21b1c 100644 (file)
@@ -71,7 +71,7 @@ class ConfigurationUtility implements \TYPO3\CMS\Core\SingletonInterface {
                /** @var $configurationManager \TYPO3\CMS\Core\Configuration\ConfigurationManager */
                $configurationManager = $this->objectManager->get('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager');
                $configurationManager->setLocalConfigurationValueByPath('EXT/extConf/' . $extensionKey, serialize($configuration));
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::removeCacheFiles();
+               $GLOBALS['typo3CacheManager']->flushCachesInGroup('system');
        }
 
        /**
index aaf1618..ec4504b 100644 (file)
@@ -262,7 +262,7 @@ class InstallUtility implements \TYPO3\CMS\Core\SingletonInterface {
         * @return void
         */
        public function reloadCaches() {
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::removeCacheFiles();
+               $GLOBALS['typo3CacheManager']->flushCachesInGroup('system');
                \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->reloadTypo3LoadedExtAndClassLoaderAndExtLocalconf();
        }
 
index 9830ad9..dc648cb 100644 (file)
@@ -6,6 +6,7 @@ if (!defined('TYPO3_MODE')) {
 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',
-               'frontend' => 'TYPO3\\CMS\\Core\\Cache\\Frontend\\PhpFrontend'
+               'frontend' => 'TYPO3\\CMS\\Core\\Cache\\Frontend\\PhpFrontend',
+               'groups' => array('system')
        );
 }
index 3e46828..626ec5f 100644 (file)
@@ -112,11 +112,19 @@ class SqlExpectedSchemaService {
         */
        public function getCachingFrameworkRequiredDatabaseSchema() {
                $cacheConfigurationBackup = $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'];
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_datamapfactory_datamap'] = array();
+               $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_datamapfactory_datamap'] = array(
+                       'groups' => array('system')
+               );
                $extbaseObjectFakeName = uniqid('extbase_object');
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$extbaseObjectFakeName] = array();
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_reflection'] = array();
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_typo3dbbackend_tablecolumns'] = array();
+               $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$extbaseObjectFakeName] = array(
+                       'groups' => array('system')
+               );
+               $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_reflection'] = array(
+                       'groups' => array('system')
+               );
+               $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_typo3dbbackend_tablecolumns'] = array(
+                       'groups' => array('system')
+               );
                /** @var \TYPO3\CMS\Core\Cache\CacheManager $cacheManager */
                $cacheManager = $GLOBALS['typo3CacheManager'];
                $cacheManager->setCacheConfigurations($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']);
index f07dff6..85eb901 100644 (file)
@@ -29,7 +29,9 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_acc
 
 // Register workspaces cache if not already done in localconf.php or a previously loaded extension.
 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['workspaces_cache'])) {
-       $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['workspaces_cache'] = array();
+       $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['workspaces_cache'] = array(
+               'groups' => array('all')
+       );
 }
 
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('options.workspaces.considerReferences = 1');