Dynamic Page Cache
Dynamic Page Cache already indicated and still indicates cache hits using X-Drupal-Dynamic-Cache: HIT and cache misses using X-Drupal-Dynamic-Cache: MISS. That does not change at all. So what does change?
- Before
-
-
X-Drupal-Dynamic-Cache: UNCACHEABLE
-
- After
-
- Changed:
X-Drupal-Dynamic-Cache: UNCACHEABLE (poor cacheability)when Dynamic Page Cache does not cache a response because the response has poor cacheability: it either has a low max-age (<=0 by default), a high-cardinality cache context (
userorsessionby default) or a high-invalidation frequency cache tag (none of these by default). The definition of what constitutes "poor cacheability" depends on therenderer.config.auto_placeholder_conditionsservice container parameter (defined incore.services.yml), which can be overridden by sites. - New:
X-Drupal-Dynamic-Cache: UNCACHEABLE (no cacheability)if the controller returned a response object that is not an instance of
\Drupal\Core\Cache\CacheableResponseInterface— because without cacheability metadata (tags, contexts, max-age), Dynamic Page Cache cannot correctly support caching. - New:
X-Drupal-Dynamic-Cache: UNCACHEABLE (request policy)if one the
dynamic_page_cache_request_policytagged services denies caching. - New:
X-Drupal-Dynamic-Cache: UNCACHEABLE (response policy)if one the
dynamic_page_cache_response_policytagged services denies caching.
- Changed:
Page Cache
Page Cache already indicated and still indicates cache hits using X-Drupal-Cache: HIT and cache misses using X-Drupal-Cache: MISS. That does not change at all. So what does change?
- New:
X-Drupal-Cache: UNCACHEABLE (request policy)None of the request policy checks allowed this request to be cached.
- New:
X-Drupal-Cache: UNCACHEABLE (response policy)if one the
page_cache_response_policytagged services denies caching.