Problem/Motivation
Currently if a response is not cacheable Drupal sets X-Drupal-Dynamic-Cache = UNCACHEABLE, but in some cases it does not. See DynamicPageCacheSubscriber::onResponse for details.
Proposed resolution
Always set X-Drupal-Dynamic-Cache
header.
- This changes the existing
X-Drupal-Dynamic-Cache: UNCACHEABLE
toX-Drupal-Dynamic-Cache: UNCACHEABLE (poor cacheability)
. - This adds
X-Drupal-Dynamic-Cache: UNCACHEABLE (no cacheability)
(for responses which aren't instances ofCacheableResponseInterface
). - This adds
X-Drupal-Dynamic-Cache: UNCACHEABLE (policy)
(when the Dynamic Page Cache request/response policy tagged services deny caching).
This makes it much easier for developers to understand what the Dynamic Page Cache module is doing, and why.
Remaining tasks
None.