ConfigBase
now implements RefinableCacheableDependencyInterface
(instead of the less specific CacheableDependencyInterface
) and uses RefinableCacheableDependencyTrait
. This allows for classes extending from ConfigBase
(most importantly Config
) to support adding cache contexts, cache tags and merging a cache max age.
Merging configuration overrides to configuration objects is done runtime by ConfigFactory. To support propagating cache metadata from configuration overrides to Config objects, ConfigFactoryOverrideInterface
got these three new public methods: getCacheContexts($name)
, getCacheTags($name)
, getCacheMaxAge($name)
.
ConfigFactory
now uses these two to retrieve all cache related metadata from overrides and propagate it to the Config
objects created.
Configuration cache metadata is further propagated to configuration entities in ConfigEntityStorage::doLoadMultiple()
and upwards to blocks for example in BlockViewBuilder::viewMultiple()
thus contributing to having an exact list of what the response depended on for caching accuracy.