dependencyInjectionCache->getBackend() instanceof ContainerBackend) { /** @var ContainerBackend $diCacheBackend */ $diCacheBackend = $this->dependencyInjectionCache->getBackend(); // We need to remove using the forceFlush method because the DI cache backend disables the flush method $diCacheBackend->forceFlush(); } // The cache manager is already instantiated in the install tool // * (both in the failsafe and the late boot container), but // * with settings to disable caching (all caches using NullBackend). // Obtain a real instance $this->lateBootService->unsetInternalContainerInstance(); $container = $this->lateBootService->getContainer(true); $this->lateBootService->makeCurrent($container); $cacheManager = $container->get(CacheManager::class); $cacheManager->flushCaches(); // From this point on, the code may fatal, if some broken extension is loaded. $this->lateBootService->loadExtLocalconfDatabase(); $extensionCaches = $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'] ?? []; // Loose comparison on purpose to allow changed ordering of the array if ($baseCaches != $extensionCaches) { // When configuration has changed during loading of extensions (due to ext_localconf.php), flush all caches again $cacheManager->setCacheConfigurations($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']); $cacheManager->flushCaches(); } } }