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

saveConfigurationCache() protected method

Saves the current configuration into a cache file and creates a cache inclusion script in the context's Configuration directory.
protected saveConfigurationCache ( ) : void
return void
    protected function saveConfigurationCache()
    {
        // Make sure that all configuration types are loaded before writing configuration caches.
        foreach (array_keys($this->configurationTypes) as $configurationType) {
            $this->getConfiguration($configurationType);
        }
        if ($this->temporaryDirectoryPath === null) {
            return;
        }
        $cachePathAndFilename = $this->constructConfigurationCachePath();
        if (!file_exists(dirname($cachePathAndFilename))) {
            Files::createDirectoryRecursively(dirname($cachePathAndFilename));
        }
        file_put_contents($cachePathAndFilename, '<?php return ' . var_export($this->configurations, true) . ';');
        OpcodeCacheHelper::clearAllActive($cachePathAndFilename);
    }