Neos\Flow\Configuration\ConfigurationManager::loadConfigurationCache PHP Method

loadConfigurationCache() public method

If a cache file with previously saved configuration exists, it is loaded.
public loadConfigurationCache ( ) : boolean
return boolean If cached configuration was loaded or not
    public function loadConfigurationCache()
    {
        $cachePathAndFilename = $this->constructConfigurationCachePath();
        if (is_file($cachePathAndFilename)) {
            $this->configurations = (require $cachePathAndFilename);
            return true;
        }
        return false;
    }

Usage Example

 /**
  * Initializes the Configuration Manager, the Flow settings and the Environment service
  *
  * @param Bootstrap $bootstrap
  * @return void
  * @throws FlowException
  */
 public static function initializeConfiguration(Bootstrap $bootstrap)
 {
     $context = $bootstrap->getContext();
     $environment = new Environment($context);
     $environment->setTemporaryDirectoryBase(FLOW_PATH_TEMPORARY_BASE);
     $bootstrap->setEarlyInstance(Environment::class, $environment);
     $packageManager = $bootstrap->getEarlyInstance(PackageManagerInterface::class);
     $configurationManager = new ConfigurationManager($context);
     $configurationManager->setTemporaryDirectoryPath($environment->getPathToTemporaryDirectory());
     $configurationManager->injectConfigurationSource(new YamlSource());
     $configurationManager->setPackages($packageManager->getActivePackages());
     $configurationManager->loadConfigurationCache();
     $settings = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow');
     $lockManager = new LockManager($settings['utility']['lockStrategyClassName'], ['lockDirectory' => Files::concatenatePaths([$environment->getPathToTemporaryDirectory(), 'Lock'])]);
     Lock::setLockManager($lockManager);
     $packageManager->injectSettings($settings);
     $bootstrap->getSignalSlotDispatcher()->dispatch(ConfigurationManager::class, 'configurationManagerReady', [$configurationManager]);
     $bootstrap->setEarlyInstance(ConfigurationManager::class, $configurationManager);
 }
All Usage Examples Of Neos\Flow\Configuration\ConfigurationManager::loadConfigurationCache