Problem/Motivation
The render system has \Drupal\Core\Render\RenderCache(Interface)
. This is capable of doing cache redirects, based on bubbled cache contexts. I.e. compare the originally known cache contexts with those that the final-to-be-cached data depends upon, and if that set is different, cache it as a cache redirect. (See RenderCache
's docs for details.)
This is useful outside of the render system too.
Proposed resolution
Abstract RenderCache
into a service (name TBD, initial quick thought: RedirectingCache
) that RenderCache
can use, so that RenderCache
is just one of many things able to use this generic concept.
Remaining tasks
TBD
User interface changes
None.
API changes
None, pure API addition.
Data model changes
None.