Skip to content

Response headers

Shane Rounce edited this page Nov 30, 2026 · 4 revisions

Response headers

The plugin tells you what it did with each request in the response headers. They are the first thing to look at when something is not as you expect.

curl -sI https://example.com/ | grep -i -E 'x-ace|cache-control|age'

X-AceRedisCache

The result from the page cache. It is sent on every front-end page request, and when a page was not served from the cache it says why.

Value Meaning
HIT Served from the page cache by the plugin, after WordPress loaded
HIT-COMPRESSED As HIT, sent as the stored compressed copy
HIT (advcache) Served by the drop-in before WordPress loaded
HIT (advcache, stale) As above, a stale copy. Its refresh has been queued.
BYPASS; reason=... The cache was not used for this request
MISS; reason=... The page was rendered but not stored
MISS The page was rendered and stored. The next request should be a hit.

BYPASS reasons

Reason Meaning
logged_in A signed-in visitor, unless the logged-in page cache covers their group
cookie A basket, session, comment author or protected post cookie
query_string A query parameter that changes the response: basket actions, password reset, ?aceredis_nocache=1
excluded_path Basket, checkout and account pages, sitemaps when excluded, and any path the site excludes
method Not a GET request
crawler A search crawler on a route the site renders differently for crawlers
preview A preview, a Customizer changeset or an editor request with ?context=edit
private_response The response is marked private, no-store or no-cache
donotcachepage Something defined DONOTCACHEPAGE for this page
warming The short pause after a post is saved
redis_unavailable Redis, or the PHP Redis extension, could not be reached
outage_recovery An invalidation was missed while Redis was down, so stored pages are being cleared first

MISS reasons

Reason Meaning
first_view The post was saved a moment ago, or the site has asked for pages to be stored on their second view (the aceredis_enable_first_pass_skip filter)
empty_main The main content did not render
empty_body The response had no body
is_404, status_not_200 Not a successful page
is_search, is_feed Not stored by design
protected_post A password-protected or unpublished post
host_mismatch, ip_host The request came in on an address that is not the site's own
local_dev_asset_reference The page links to assets on a local development address

A site can add reasons of its own with the aceredis_page_store_block_reason filter.

To leave the reasons out of the header:

add_filter( 'aceredis_expose_bypass_reason', '__return_false' );

Before 0.10.4 the header carried no reason for most misses, and the bypass values were written BYPASS private, BYPASS param, BYPASS preview and so on.

ETag and conditional requests

Each page cache hit carries an ETag that names the stored copy. A browser or crawler that sends it back in If-None-Match, or sends a matching If-Modified-Since, gets 304 Not Modified with no body. That works from the drop-in and from WordPress alike, and the cache status header is still sent.

  • Last-Modified is sent only when Browser Cache Headers is on.
  • Signed-in copies and pages with live blocks always send the full page.
  • Switch it off with define( 'ACEREDIS_CONDITIONAL', false ); or the aceredis_conditional_requests filter.

X-Ace-Early

What the advanced-cache.php drop-in did before WordPress loaded. It appears once the drop-in has connected to Redis.

Value Meaning
HIT Found a fresh stored page
HIT stale Found a stale stored page inside its grace window
HIT filled Found a page with live blocks and filled them from their microcache copies
HIT filled stale-block As above, using an older copy of at least one block, which is being re-rendered in the background
MISS no-connection Could not connect to Redis
MISS no-tokens Connected, but this site's key details are not in that Redis database
MISS no-key No stored copy of this page
MISS stale The copy is stale and ACEREDIS_EARLY_STALE is false
MISS dynamic The page has live blocks with no usable copy
MISS undecodable The stored copy could not be decoded here
MISS uninspectable The stored copy could not be checked for live blocks
BYPASS path The path is one the plugin said must not be served from cache
BYPASS crawler A crawler rule matched

Every value ends ; dark-launch until ACEREDIS_EARLY_SERVE is set to true. In dark launch the drop-in reports what it would have done and then lets WordPress handle the request.

No X-Ace-Early header means the drop-in stood aside before looking: a login or basket cookie, a non-GET request, a REST or admin path, WP_CACHE not set, or the Redis extension missing. For front-end pages X-AceRedisCache gives the reason.

X-AceRedisCache-Variant

Sent to signed-in visitors when the logged-in page cache covers them. It names the copy: li-admin, li-editor, li-reader or li-customer, with -ab when the toolbar is showing.

X-AceRedisCache-Skip

Sent to signed-in visitors on a MISS when the page was not stored, with the reason. See Page cache and Logged-in page cache.

X-Ace-Block-Cache

One entry per cached block type on the page: hit, miss, skip or live-<reason>. Send the request header X-Ace-Block-Cache-Debug: 1 to have the block names included. See Block cache.

Edge cache headers

Off by default. See Varnish and CDNs.

Header Sent when Value
Cache-Tag, Surrogate-Key Cache tag headers is on The tags for what is on the page, each starting with a short code for the site
CDN-Cache-Control CDN-Cache-Control header is on The shared lifetime

Browser cache headers

With Browser Cache Headers on, page cache hits also send:

Header Value
Cache-Control public with the max-age you set
Expires Now plus the max-age
Vary Cookie

Meta headers

Off by default. Turn on cache meta headers beside the browser cache setting while you are debugging, and off again afterwards.

Header Meaning
X-AceRedisCache-Age Seconds since the page was stored
Age The same, as the standard header. Hits only.
X-AceRedisCache-TTL-Remaining Seconds until the stored copy expires
X-AceRedisCache-Orig-TTL The lifetime it was stored with
X-AceRedisCache-Compression How the stored copy is compressed
X-AceRedisCache-Dynamic on when the page has live blocks
X-AceRedisCache-Dynamic-Count How many live blocks
X-AceRedisCache-Dynamic-Miss How many were rendered on this request
X-AceRedisCache-Dynamic-MicroHits How many came from the microcache
X-AceRedisCache-Dynamic-Capped 1 when the page had more live blocks than the limit

Request headers that force a fresh render

You will see the first, second and fourth in your access logs. They mark requests the plugin makes to your own site.

Header Sent by
X-AceRedis-Prime The refresher, re-rendering a page
X-AceRedis-Sitemap-Prime The sitemap warmer
X-AceRedis-Refresh Nothing in the plugin. Send it yourself to have a page rendered fresh and stored again.
X-AceRedis-Dyn The background render of a live block

Requests carrying any of them always reach WordPress and are never answered from the cache. If a proxy in front of the site caches pages, let these through to PHP. See Varnish and CDNs.

In the page source

The reason a page was not stored is in the X-AceRedisCache header. With WP_DEBUG on, the page also ends with a comment giving it:

<!-- AceRedisCache: page_cache=SKIP reason=empty_main -->

Clone this wiki locally