[TASK] Use SimpleFileBackend for t3lib_l10n cache 79/24079/2
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:25:35 +0000 (21:25 +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
(cherry picked from commit 3d0008feb8afa84b1f39ceeb017de2a2d4aca3e4)
Reviewed-on: https://review.typo3.org/24079

typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/lang/ext_localconf.php

index 6551d5b..88e3a72 100644 (file)
@@ -174,8 +174,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' => '', // 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 be9ab19..f11b14e 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';
@@ -18,4 +12,4 @@ if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['lang']['cache']['clear_menu']) &&
 }
 // Register Ajax call
 $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['lang::clearCache'] = 'TYPO3\CMS\Lang\LanguageCacheClearer->clearCache';
-?>
\ No newline at end of file
+?>