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);
}