[TASK] Move XLIFF handling to t3lib
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_cache.php
index c54820d..fa062d4 100644 (file)
@@ -56,13 +56,10 @@ class t3lib_cache {
         *
         * @return      void
         * @author      Ingo Renner <ingo@typo3.org>
+        * @deprecated since TYPO3 4.6, will be removed in 4.8 - cacheManager->getCache() now initializes caches automatically
         */
        public static function initPageCache() {
-               try {
-                       $GLOBALS['typo3CacheManager']->getCache('cache_pages');
-               } catch (t3lib_cache_exception_DuplicateIdentifier $e) {
-                       // do nothing, a cache_pages cache already exists
-               }
+               t3lib_div::logDeprecatedFunction();
        }
 
        /**
@@ -70,13 +67,10 @@ class t3lib_cache {
         *
         * @return      void
         * @author      Ingo Renner <ingo@typo3.org>
+        * @deprecated since TYPO3 4.6, will be removed in 4.8 - cacheManager->getCache() now initializes caches automatically
         */
        public static function initPageSectionCache() {
-               try {
-                       $GLOBALS['typo3CacheManager']->getCache('cache_pagesection');
-               } catch (t3lib_cache_exception_DuplicateIdentifier $e) {
-                       // do nothing, a cache_pagesection cache already exists
-               }
+               t3lib_div::logDeprecatedFunction();
        }
 
        /**
@@ -84,13 +78,10 @@ class t3lib_cache {
         *
         * @return      void
         * @author      Ingo Renner <ingo@typo3.org>
+        * @deprecated since TYPO3 4.6, will be removed in 4.8 - cacheManager->getCache() now initializes caches automatically
         */
        public static function initContentHashCache() {
-               try {
-                       $GLOBALS['typo3CacheManager']->getCache('cache_hash');
-               } catch (t3lib_cache_exception_DuplicateIdentifier $e) {
-                       // do nothing, a cache_hash cache already exists
-               }
+               t3lib_div::logDeprecatedFunction();
        }
 
        /**
@@ -115,18 +106,11 @@ class t3lib_cache {
         * This method can be called by extensions in their ext_localconf.php. Calling it later would not work,
         * since rendering is already started using the defined caches.
         *
+        * @deprecated since 4.6, will be removed in 4.8: The caching framework is enabled by default
         * @return      void
         */
        public function enableCachingFramework() {
-               if (!defined('TYPO3_UseCachingFramework')) {
-                       $GLOBALS['TYPO3_CONF_VARS']['SYS']['useCachingFramework'] = 1;
-               } elseif (!TYPO3_UseCachingFramework) {
-                       throw new RuntimeException(
-                               'The caching framework was already defined to be disabled and cannot be changed. ' .
-                                               'Please put your call to t3lib_cache::enableCachingFramework() into ext_localconf.php.',
-                               1253273131
-                       );
-               }
+               t3lib_div::logDeprecatedFunction();
        }
 }