diff --git a/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php b/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php index 4faa057338edeff301df13e83cea151952250a32..24da0fab5a0285d11a42734a3e8b17d75fb47b42 100644 --- a/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php +++ b/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php @@ -77,8 +77,8 @@ class ClearCacheToolbarItem implements ToolbarItemInterface ) { $this->cacheActions[] = array( 'id' => 'system', - 'title' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushSystemCachesTitle')), - 'description' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushSystemCachesDescription')), + 'title' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushAllCachesTitle2')), + 'description' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushAllCachesDescription2')), 'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'all']), 'icon' => $this->iconFactory->getIcon('actions-system-cache-clear-impact-high', Icon::SIZE_SMALL)->render() ); diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php index 323f67e795e770c90b8a67e98f84f7255fe89179..34cf327c0ce411f4df1e58798d1500113a681cd4 100644 --- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php +++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php @@ -7812,8 +7812,6 @@ class DataHandler break; case 'all': if ($this->admin || $this->BE_USER->getTSConfigVal('options.clearCache.all')) { - // Delete typo3temp/var/Cache manually as quick, straight and brutal approach here - GeneralUtility::flushDirectory(PATH_site . 'typo3temp/var/Cache', true, true); $this->getCacheManager()->flushCaches(); $this->databaseConnection->exec_TRUNCATEquery('cache_treelist'); // Delete Opcode Cache @@ -7822,6 +7820,11 @@ class DataHandler break; case 'temp_cached': case 'system': + GeneralUtility::deprecationLog( + 'Calling clear_cacheCmd() with arguments \'temp_cached\' or \'system\', using' + . ' the ts config option \'options.clearCache.system\' or using' + . '\'$GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'clearCacheSystem\'] has been deprecated.' + ); if ($this->admin || $this->BE_USER->getTSConfigVal('options.clearCache.system') || ((bool)$GLOBALS['TYPO3_CONF_VARS']['SYS']['clearCacheSystem'] === true && $this->admin)) { $this->getCacheManager()->flushCachesInGroup('system'); diff --git a/typo3/sysext/core/Configuration/DefaultConfiguration.php b/typo3/sysext/core/Configuration/DefaultConfiguration.php index 132a3d34fecf2e5707bc8a254678fe5831383968..2fd8b997a2da12ea5ec6d60395d0bb2f25eb327d 100644 --- a/typo3/sysext/core/Configuration/DefaultConfiguration.php +++ b/typo3/sysext/core/Configuration/DefaultConfiguration.php @@ -277,7 +277,6 @@ return array( 'livesearch' => array(), // Array: keywords used for commands to search for specific tables 'isInitialInstallationInProgress' => false, // Boolean: If TRUE, the installation is 'in progress'. This value is handled within the install tool step installer internally. 'isInitialDatabaseImportDone' => true, // Boolean: If TRUE, the database import is finished. This value is handled within the install tool step installer internally. - 'clearCacheSystem' => false, // Boolean: If set, the toolbar menu entry for clearing system caches (core cache, class cache, etc.) is visible for admin users. 'formEngine' => array( 'nodeRegistry' => array(), // Array: Registry to add or overwrite FormEngine nodes. Main key is a timestamp of the date when an entry is added, sub keys type, priority and class are required. Class must implement TYPO3\CMS\Backend\Form\NodeInterface. 'nodeResolver' => array(), // Array: Additional node resolver. Main key is a timestamp of the date when an entry is added, sub keys type, priority and class are required. Class must implement TYPO3\CMS\Backend\Form\NodeResolverInterface. diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-75625-DeprecatedCacheClearingOptions.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-75625-DeprecatedCacheClearingOptions.rst new file mode 100644 index 0000000000000000000000000000000000000000..4738673f285bad3e6aa163a24ddf80c1df6ae179 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-75625-DeprecatedCacheClearingOptions.rst @@ -0,0 +1,31 @@ +======================================================= +Deprecation: #75625 - Deprecated cache clearing options +======================================================= + +Description +=========== + +The following commands have been deprecated and should not be used anymore: + +* Method :php:`DataHandler->clear_cacheCmd()` with arguments `system` and `temp_cached` +* ``userTSconfig`` setting ``options.clearCache.system`` +* Option ``$TYPO3_CONF_VARS['SYS']['clearCacheSystem']`` + + +Impact +====== + +Directly or indirectly using method ``clear_cacheCmd`` with these arguments will trigger a deprecation log entry. + + +Affected Installations +====================== + +All installations with third party extensions using this method are affected. + + +Migration +========= + +If the group of system caches needs to be deleted explicitely, use :php:`flushCachesInGroup('system')` +of ``CacheManager`` directly. \ No newline at end of file diff --git a/typo3/sysext/install/Classes/Configuration/Context/CustomPreset.php b/typo3/sysext/install/Classes/Configuration/Context/CustomPreset.php index 6e6e34ef33c6273dc2db90665d267dccc67b0e10..28a478a69aece4a7f02e4d6bd62d4b7ab4eb203a 100644 --- a/typo3/sysext/install/Classes/Configuration/Context/CustomPreset.php +++ b/typo3/sysext/install/Classes/Configuration/Context/CustomPreset.php @@ -32,6 +32,5 @@ class CustomPreset extends Configuration\AbstractCustomPreset implements Configu 'SYS/enableDeprecationLog' => '', 'SYS/sqlDebug' => '', 'SYS/systemLogLevel' => '', - 'SYS/clearCacheSystem' => '', ); } diff --git a/typo3/sysext/install/Classes/Configuration/Context/DebugPreset.php b/typo3/sysext/install/Classes/Configuration/Context/DebugPreset.php index a328859f2bcad1574af6311315c91af1d961f1ac..97192f09eebe4ddccb56191e9637a1e6ec5a36a0 100644 --- a/typo3/sysext/install/Classes/Configuration/Context/DebugPreset.php +++ b/typo3/sysext/install/Classes/Configuration/Context/DebugPreset.php @@ -44,7 +44,6 @@ class DebugPreset extends Configuration\AbstractPreset 'SYS/systemLogLevel' => 0, // E_WARNING | E_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED 'SYS/exceptionalErrors' => 28674, - 'SYS/clearCacheSystem' => true, ); /** diff --git a/typo3/sysext/install/Classes/Configuration/Context/LivePreset.php b/typo3/sysext/install/Classes/Configuration/Context/LivePreset.php index fe0c763317d621c8c6a8662c1117b3e30e48012a..5c5b7f5f13516cef9e8d00f7a4dc765454bd028d 100644 --- a/typo3/sysext/install/Classes/Configuration/Context/LivePreset.php +++ b/typo3/sysext/install/Classes/Configuration/Context/LivePreset.php @@ -42,7 +42,6 @@ class LivePreset extends Configuration\AbstractPreset 'SYS/enableDeprecationLog' => false, 'SYS/sqlDebug' => 0, 'SYS/systemLogLevel' => 2, - 'SYS/clearCacheSystem' => false, ); /** diff --git a/typo3/sysext/install/Classes/Service/SilentConfigurationUpgradeService.php b/typo3/sysext/install/Classes/Service/SilentConfigurationUpgradeService.php index cd6eb7ce7d0dc8f2d084bb0d7f46d6ccd3f34cc2..7368da2d9be7f2c824348a1d70070e4dd1953c2f 100755 --- a/typo3/sysext/install/Classes/Service/SilentConfigurationUpgradeService.php +++ b/typo3/sysext/install/Classes/Service/SilentConfigurationUpgradeService.php @@ -96,7 +96,9 @@ class SilentConfigurationUpgradeService 'SYS/curlTimeout', // #75355 'BE/niceFlexFormXMLtags', - 'BE/compactFlexFormXML' + 'BE/compactFlexFormXML', + // #75625 + 'SYS/clearCacheSystem', ]; public function __construct(ConfigurationManager $configurationManager = null) diff --git a/typo3/sysext/lang/locallang_core.xlf b/typo3/sysext/lang/locallang_core.xlf index 1a1650c71cdf7f770e615a20a171dd4609de9c67..baafd2378645b8f795c49a5aa7e5c67c825fd281 100644 --- a/typo3/sysext/lang/locallang_core.xlf +++ b/typo3/sysext/lang/locallang_core.xlf @@ -863,23 +863,11 @@ Do you want to refresh it now?</source> <trans-unit id="flushPageCachesDescription"> <source>Clear frontend and page-related caches.</source> </trans-unit> - <trans-unit id="flushAllCachesTitle"> + <trans-unit id="flushAllCachesTitle2"> <source>Flush all caches</source> </trans-unit> - <trans-unit id="flushAllCachesDescription"> - <source>Clear all caches, including frontend caches, and extension-specific caches. Compile-time caches / system caches that are needed for TYPO3 to run are not touched.</source> - </trans-unit> - <trans-unit id="flushGeneralCachesTitle"> - <source>Flush general caches</source> - </trans-unit> - <trans-unit id="flushGeneralCachesDescription"> - <source>Clear frontend and page-related caches, plus some backend-related caches.</source> - </trans-unit> - <trans-unit id="flushSystemCachesTitle"> - <source>Flush all caches</source> - </trans-unit> - <trans-unit id="flushSystemCachesDescription"> - <source>Clear all system-related caches, including the class loader, localization, extension configuration file caches and opcode caches. Rebuilding this cache may take some time.</source> + <trans-unit id="flushAllCachesDescription2"> + <source>Clear all system-related caches, including localization, extension configuration, file caches and opcode caches. Rebuilding this cache may take some time.</source> </trans-unit> <trans-unit id="rm.adminFunctions"> <source>Admin functions</source>