[BUGFIX] Fix no caching behavior of bootstrap 88/28088/4
authorHelmut Hummel <helmut.hummel@typo3.org>
Thu, 27 Feb 2014 14:09:23 +0000 (15:09 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 5 Mar 2014 21:41:08 +0000 (22:41 +0100)
Install Tool and tests are intended to work
without caches being active.

Currently this functionality is broken in bootstrap
because it is applied too late and does not
respect classes cache.

Resolves: #56583
Releases: 6.2
Change-Id: I45bb11d3b7951b189c1f12c3da6969285575d72b
Reviewed-on: https://review.typo3.org/28088
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Core/Bootstrap.php

index bb44f5b..c9942f7 100644 (file)
@@ -222,19 +222,16 @@ class Bootstrap {
         * @internal This is not a public API method, do not use in own extensions
         */
        public function loadConfigurationAndInitialize($allowCaching = TRUE, $packageManagerClassName = 'TYPO3\\CMS\\Core\\Package\\PackageManager') {
-               $this
-                       ->initializeClassLoader()
-                       ->populateLocalConfiguration()
-                       ->initializeCachingFramework()
+               $this->initializeClassLoader()
+                       ->populateLocalConfiguration();
+               if (!$allowCaching) {
+                       $this->disableCoreAndClassesCache();
+               }
+               $this->initializeCachingFramework()
                        ->initializeClassLoaderCaches()
                        ->initializePackageManagement($packageManagerClassName)
                        ->initializeRuntimeActivatedPackagesFromConfiguration();
 
-               // @TODO dig into this
-               if (!$allowCaching) {
-                       $this->setCoreCacheToNullBackend();
-               }
-
                $this->defineDatabaseConstants()
                        ->defineUserAgentConstant()
                        ->registerExtDirectComponents()
@@ -418,9 +415,11 @@ class Bootstrap {
         * @return \TYPO3\CMS\Core\Core\Bootstrap
         * @internal This is not a public API method, do not use in own extensions
         */
-       public function setCoreCacheToNullBackend() {
+       public function disableCoreAndClassesCache() {
                $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_core']['backend']
                        = 'TYPO3\\CMS\\Core\\Cache\\Backend\\NullBackend';
+               $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_classes']['backend']
+                       = 'TYPO3\\CMS\\Core\\Cache\\Backend\\TransientMemoryBackend';
                return $this;
        }