Checker
WooCommerce cache headers checker
A cached checkout can show one shopper another's cart, and an uncacheable product page makes every visit wait for PHP. Paste a page's response headers and see which you have.
From a terminal (no cookies are sent, like a first-time visitor):
curl -sI https://your-store.com/cart/Or copy them from the browser: DevTools, Network, the page request, Response Headers.
Nothing you paste leaves this page, and no request is made to your store.
Worked example
WooCommerce cart and product caching examples
Example 1: a cached cart page
For a cart page, paste these illustrative response headers into the checker:
HTTP/2 200
content-type: text/html; charset=UTF-8
cache-control: public, max-age=3600
cf-cache-status: HIT
age: 412
The result is danger: "This page came from a cache".
The explanation is: "cf-cache-status: HIT. Cart, checkout and account pages must never be cached: a cached copy can show one shopper another's cart. Exclude this URL from the page cache and the CDN."
Fix both layers. Exclude cart, checkout and account URLs from the page cache and from any CDN HTML cache rules. WooCommerce's caching plugin guidance (opens in a new tab) also says Cart, My Account and Checkout must remain dynamic. WooCommerce core sets DONOTCACHEPAGE on those pages for caching plugins that respect the constant, but a CDN or server rule can still need its own exclusion.
Example 2: a product page cache hit
Suppose the first anonymous product request returns:
cache-control: public, max-age=0, s-maxage=3600
cf-cache-status: MISS
The checker reports info: "A cache miss". Run the same request again. One miss can simply mean the cache did not already contain that response.
If the second response contains cf-cache-status: HIT and age: 37, the result becomes good: "Served from a cache". Anonymous visitors get this page without waiting for PHP.
That is why you test catalogue pages twice. Two consecutive misses are the useful warning that the page is not being cached. If you are deciding which WordPress pages should reach the CDN cache, see the WordPress CDN caching guide.
Cache headers the checker reads
| Header | Usually sent by | Hit | Miss or bypass |
|---|---|---|---|
cf-cache-status | Cloudflare | HIT, STALE, REVALIDATED, UPDATING | MISS, EXPIRED, BYPASS, DYNAMIC |
x-litespeed-cache | LiteSpeed Cache | hit | miss |
x-cache, x-cache-status | Proxy, CDN or host | HIT or equivalent | MISS or equivalent |
x-proxy-cache, x-nginx-cache | Proxy, host or nginx cache | HIT or equivalent | MISS or equivalent |
x-varnish | Varnish | Two request IDs | One request ID |
age | Cache or proxy | Greater than 0 | No positive age |
Cloudflare defines DYNAMIC as an asset it does not consider eligible to cache, with no setting telling Cloudflare to cache it. BYPASS means the origin tells Cloudflare to bypass the cache even though Cloudflare would otherwise cache the response, such as through Cache-Control: no-cache, private or max-age=0, or cookies in the response. Cloudflare documents these states in its cache response reference (opens in a new tab). For HTML you expected to cache, either status is a reason to inspect the cache rules and origin response.
Collect cache headers without cookies
Start with an anonymous request that carries no browser cookies:
curl -sI https://example.com/product/example-product/
Run it twice and compare the responses. A logged-in browser can produce different WooCommerce cache headers because authentication and session cookies can cause caches to skip the request.
The checker also warns when a catalogue page sets woocommerce_items_in_cart, woocommerce_cart_hash or wp_woocommerce_session_*. Page caches usually skip requests carrying those cookies, so an unexpected session cookie can explain repeated misses.
How to read cache headers
- Test cart, checkout and my account first. They must never come from a cache.
- Then test a product page and a category page twice. The second request should come from the cache.
- If a catalogue page sets a WooCommerce session cookie on a first visit, find what starts the session: page caches usually skip any request that carries one.
The checker reads what the headers say. A CDN or host can apply rules the headers do not show, so confirm a fix with a second request. How to speed up WooCommerce covers caching alongside the rest of a store's speed work.
Fix a cached WooCommerce checkout
Send me the headers and the host or caching plugin you use, and I will say how I would fix the rules.
