[BUGFIX] Use runtime cache in TCEmain
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 24 Jun 2011 15:34:07 +0000 (17:34 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Fri, 24 Jun 2011 19:19:26 +0000 (21:19 +0200)
Change-Id: I675b1998d255ea4b9fda3e7725b9fd9d96a0f1d6
Resolves: #27685
Depends: #27208
Reviewed-on: http://review.typo3.org/2911
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
t3lib/class.t3lib_tcemain.php

index 5a3a4d1..785b776 100644 (file)
@@ -7097,18 +7097,7 @@ class t3lib_TCEmain {
         * @return t3lib_cache_frontend_VariableFrontend
         */
        protected function getMemoryCache() {
-               t3lib_cache::initializeCachingFramework();
-               $cacheIdentifier = 't3lib_TCEmain';
-
-               if ($GLOBALS['typo3CacheManager']->hasCache($cacheIdentifier) === FALSE) {
-                       $GLOBALS['typo3CacheFactory']->create(
-                               $cacheIdentifier,
-                               't3lib_cache_frontend_VariableFrontend',
-                               't3lib_cache_backend_TransientMemoryBackend'
-                       );
-               }
-
-               return $GLOBALS['typo3CacheManager']->getCache($cacheIdentifier);
+               return $GLOBALS['typo3CacheManager']->getCache('cache_runtime');
        }
 
        /**
@@ -7123,7 +7112,7 @@ class t3lib_TCEmain {
         * @see versionizeRecord
         */
        protected function isElementToBeDeleted($table, $id) {
-               $elementsToBeDeleted = (array) $this->getMemoryCache()->get('elementsToBeDeleted');
+               $elementsToBeDeleted = (array) $this->getMemoryCache()->get('core-t3lib_TCEmain-elementsToBeDeleted');
                return (isset($elementsToBeDeleted[$table][$id]));
        }
 
@@ -7134,9 +7123,9 @@ class t3lib_TCEmain {
         * @see process_datamap
         */
        protected function registerElementsToBeDeleted() {
-               $elementsToBeDeleted = (array) $this->getMemoryCache()->get('elementsToBeDeleted');
+               $elementsToBeDeleted = (array) $this->getMemoryCache()->get('core-t3lib_TCEmain-elementsToBeDeleted');
                $this->getMemoryCache()->set(
-                       'elementsToBeDeleted',
+                       'core-t3lib_TCEmain-elementsToBeDeleted',
                        array_merge($elementsToBeDeleted, $this->getCommandMapElements('delete'))
                );
        }
@@ -7148,7 +7137,7 @@ class t3lib_TCEmain {
         * @see process_datamap
         */
        protected function resetElementsToBeDeleted() {
-               $this->getMemoryCache()->remove('elementsToBeDeleted');
+               $this->getMemoryCache()->remove('core-t3lib_TCEmain-elementsToBeDeleted');
        }
 
        /**