Problem/Motivation
There are blocks like views_exposed filters that rely on the main request, but there is no way to specify that.
Panels and SCOTCH would like a render pipeline, where even the main content is created with #pre_render(_cache) and things are independent of another.
This is not possible currently and the main request always needs to be executed.
This however is different now that with SmartCache we could have per route caching and is also an important step for placeholder-ing.
Proposed resolution
- Introduce cache_context.main_request
- Ensure that if something has set this cache_context, when getting this item from cache, that the main request is executed.
Remaining tasks
- Implement the cache context
- Add the necessary logic.
Comments
Comment #1
Wim Leers