Back in #2318377: Determine whether a view is cacheable and its required contexts, store this i/t config entity we introduced a CachePluginInterface so that Views plugins & handlers can specify:
- which cache contexts their behavior (output/filtering/sorting…) is varied by
- whether their behavior is cacheable at all (boolean)
CacheableDependencyInterface was introduced in the meantime which has the same feature, but instead of a boolean flag for cacheability has a max-age, plus it allows to specify cache tags.
Everything else in core uses CacheableDependencyInterface, so to improve DX and reduce the learning curve, CachePluginInterface was removed in favor of CacheableDependencyInterface.
Upgrading
Views handler & plugins
Existing Views handlers/plugins will need to be updated and have to implement CacheableDependencyInterface.
Installed views
Along with these changes #2464427: Replace CacheablePluginInterface with CacheableDependencyInterface also provides an upgrade path for views already exist in config storage.
Default views
In #2464427: Replace CacheablePluginInterface with CacheableDependencyInterface core default views are updated to accommodate the new changes. Contrib modules which provides default views have to update those.
The changes will be like this
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- cacheable: false
+ max_age: 0