X-Drupal-Cache
The HTTP X-Drupal-Cache response header is an unofficial header indicating whether Drupal's Internal Page Cache served the response from its full-page cache layer.
Note
The "X-" naming convention for HTTP headers, "X" referring to "experimental", has been deprecated and needs to be transitioned to the formal naming convention for HTTP headers.
Usage
Drupal 8 and later versions use a two-layer caching architecture. The Internal Page Cache is the outer layer, responsible for storing complete rendered pages for anonymous visitors. When this cache has a stored copy of the requested page, Drupal skips bootstrapping most of the application and returns the cached response directly.
The X-Drupal-Cache header reports whether the Internal Page Cache had a stored copy. This is distinct from the X-Drupal-Dynamic-Cache header, which tracks the inner cache layer responsible for caching render arrays with varying levels of personalization. Both headers appear together in responses from Drupal sites, giving a complete view of how each cache layer handled the request. The Cache-Control header and Vary header work alongside these Drupal-specific headers to control downstream Caching behavior.
Values
HIT
The HIT value means the Internal Page Cache had a stored copy
of the requested page. The response was served directly from
cache without executing Drupal's rendering pipeline.
MISS
The MISS value means the Internal Page Cache did not have a
stored copy. Drupal rendered the page from scratch, and the
response is now stored in cache for subsequent anonymous
requests.
UNCACHEABLE
The UNCACHEABLE value means the response was excluded from
the Internal Page Cache based on response policy. This occurs
when the page contains session-dependent content, when the
request includes specific Cookies, or when cache
metadata on the response marks the page as uncacheable.
Example
A HIT means the Drupal Internal Page Cache had a stored copy
of the page. The response was delivered without running Drupal's
full rendering process, resulting in significantly faster
response times.
X-Drupal-Cache: HIT
A MISS means no cached version existed. This is typical for
the first request to a page after a cache clear, or when the
cached entry has been invalidated through content updates.
X-Drupal-Cache: MISS
On sites running Drupal 8+, both cache headers often appear together. The outer layer (X-Drupal-Cache) handles full-page caching for anonymous traffic, while the inner layer (X-Drupal-Dynamic-Cache) caches render arrays with placeholders for personalized elements.
X-Drupal-Cache: HIT
X-Drupal-Dynamic-Cache: MISS
Takeaway
The X-Drupal-Cache header reports whether Drupal's Internal Page Cache served a stored copy of the full page. Combined with X-Drupal-Dynamic-Cache, the two headers reveal how both layers of Drupal's caching architecture handled the request.