Problem/Motivation
When a site is served via HTTP/2, it may make sense to disable CSS/JS asset aggregation. But we still want that to happen for HTTP/1 clients. We currently can't serve both.
Proposed resolution
Add a cache context that allows responses (or any computation, really) to vary by the protocol used.
This would allow modules like https://www.drupal.org/project/http2_server_push, https://www.drupal.org/project/advagg or https://www.drupal.org/project/jsonapi_push to behave smarter.
Remaining tasks
- Review
- RTBC
- Update docs at https://www.drupal.org/docs/8/api/cache-api/cache-contexts
- Commit
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
None.