public saveToCache ( ) : void | ||
return | void |
public function saveToCache()
{
if ($this->hasFrozenCacheInProduction()) {
return;
}
if (!$this->initialized) {
$this->initialize();
}
if ($this->loadFromClassSchemaRuntimeCache === true) {
return;
}
if (!$this->reflectionDataCompiletimeCache instanceof FrontendInterface) {
throw new Exception('A cache must be injected before initializing the Reflection Service.', 1232044697);
}
if ($this->updatedReflectionData !== []) {
$this->updateReflectionData();
}
if ($this->context->isProduction()) {
$this->saveProductionData();
return;
}
$this->saveDevelopmentData();
}