protected DrupalKernel::cacheDrupalContainer(array $container_definition)
Stores the container definition in a cache.
Parameters
array $container_definition: The container definition to cache.
Return value
bool TRUE if the container was successfully cached.
File
- core/lib/Drupal/Core/DrupalKernel.php, line 1299
Class
- DrupalKernel
- The DrupalKernel class is the core of Drupal itself.
Namespace
Drupal\Core
Code
protected function cacheDrupalContainer(array $container_definition) {
$saved = TRUE;
try {
$this->bootstrapContainer->get('cache.container')->set($this->getContainerCacheKey(), $container_definition);
}
catch (\Exception $e) {
// There is no way to get from the Cache API if the cache set was
// successful or not, hence an Exception is caught and the caller informed
// about the error condition.
$saved = FALSE;
}
return $saved;
}
Please login to continue.