public function EnvironmentConfigOverride::getCacheableMetadata in Config override 8
Gets the cacheability metadata associated with the config factory override.
Parameters
string $name: The name of the configuration override to get metadata for.
Return value
\Drupal\Core\Cache\CacheableMetadata A cacheable metadata object.
Overrides ConfigFactoryOverrideInterface::getCacheableMetadata
File
- src/
EnvironmentConfigOverride.php, line 90
Class
- EnvironmentConfigOverride
- Provides a config override which uses the environment variable.
Namespace
Drupal\config_overrideCode
public function getCacheableMetadata($name) {
// @todo Not sure what we should define here.
$cacheableMetadata = new CacheableMetadata();
$cacheableMetadata
->addCacheTags([
'env',
]);
return $cacheableMetadata;
}