[TASK] Use SimpleFileBackend for t3lib_l10n cache 64/24064/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 26 Sep 2013 13:00:08 +0000 (15:00 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 26 Sep 2013 19:23:34 +0000 (21:23 +0200)
The language cache by default uses the FileBackend to store its data.
Language cache entries need to be deleted only if new extensions are
loaded and if new language overlays are fetched. They do not need
tagging and can have an unlimited lifetime.
Switching to SimpleFileBackend removes the tagging and sets unlimited
lifetime by to reduce read and write load on this cache.

Change-Id: I5c4778f4c38ae369b6873574e961fa65208d77a1
Resolves: #52295
Related: #52125
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/24064
Reviewed-by: Wouter Wolters
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Thomas Maroschik
Tested-by: Thomas Maroschik
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/lang/ext_localconf.php

index 3f102aa..2fac5b1 100644 (file)
@@ -170,8 +170,13 @@ return array(
                                        'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
                                        'backend' => 'TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend',
                                        'options' => array()
-                               )
-                       )
+                               ),
+                               't3lib_l10n' => array(
+                                       'frontend' => 'TYPO3\CMS\Core\Cache\Frontend\VariableFrontend',
+                                       'backend' => 'TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend',
+                                       'options' => array(),
+                               ),
+                       ),
                ),
                'defaultCategorizedTables' => 'pages,tt_content', // List of comma separated tables that are categorizable by default.
                'displayErrors' => -1,          // <p>Integer (-1, 0, 1, 2). Configures whether PHP errors should be displayed.</p><dl><dt>0</dt><dd>Do not display any PHP error messages. Overrides the value of "exceptionalErrors" and sets it to 0 (= no errors are turned into exceptions), the configured "productionExceptionHandler" is used as exception handler</dd><dt>1</dt><dd>Display error messages with the registered errorhandler. The configured "debugExceptionHandler" is used as exception handler</dd><dt>2</dt><dd>Display errors only if client matches <a href="#SYS-devIPmask">[SYS][devIPmask]</a>. If devIPmask matches the users IP address  the configured "debugExceptionHandler" is used  for exceptions, if not "productionExceptionHandler" will be used</dd><dt>-1</dt><dd>Default setting. With this option, you can override the PHP setting "display_errors". If devIPmask matches the users IP address  the configured "debugExceptionHandler" is used  for exceptions, if not "productionExceptionHandler" will be used.</dd></dl>
index f8fdec1..a3fc91a 100644 (file)
@@ -2,13 +2,7 @@
 if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
-// Register cache t3lib_l10n
-if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['t3lib_l10n'])) {
-       $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['t3lib_l10n'] = array();
-}
-if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['t3lib_l10n']['backend'])) {
-       $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['t3lib_l10n']['backend'] = 'TYPO3\CMS\Core\Cache\Backend\FileBackend';
-}
+
 if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['lang']['cache']['clear_menu']) && $GLOBALS['TYPO3_CONF_VARS']['SYS']['lang']['cache']['clear_menu']) {
        // Register Clear Cache Menu hook
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions']['clearLangCache'] = 'TYPO3\CMS\Lang\ClearLanguageCacheMenuItem';