WooCommerce checkout cache checker
Is your checkout being cached? A page cache makes a store fast by giving every visitor the same stored copy of a page. On the cart and checkout, that copy was made for somebody else. Enter your store’s address and we will check whether yours is doing it.
Why a cached checkout breaks quietly
The site stays up and fast. That is what makes it expensive: nothing looks wrong until someone counts the orders.
What customers see
The cart and checkout are built for one visitor: their items, their totals, and short-lived security tokens (nonces) WooCommerce checks when an order is placed. A cached copy has the first visitor’s version of all three. Customers see an empty cart after adding something, or a cart that is not theirs; placing the order fails with a message about the session having expired, or simply with “please try again”.
A cached account page is worse: it can show one customer’s name, address and orders to the next.
How it usually starts
A cache plugin is switched on or reconfigured, a CDN rule is set to “cache everything”, the store moves host, or the cart page is given a new address the cache does not know to skip. The home page gets faster, the uptime check stays green, and orders fall off a little or a lot depending on how many customers hit the stored copy.
WooCommerce marks its cart, checkout and account pages as not to be stored. Most caches respect that; some are told not to.
To customers it looks much like a payment failure. If payments are failing and this check finds no cache, work through what to check when WooCommerce payments are failing.
How the check works, and what it cannot see
Two visits to each page, a moment apart, as a new customer with an empty basket.
What we do
We request your home page, cart and checkout twice each, 0.4 seconds apart, with no cookies. If the cart or checkout is not at the usual address we look for it in your home page’s WooCommerce settings and links. We read the headers caches add (cf-cache-status, x-cache, age, x-litespeed-cache, x-kinsta-cache, x-sg-cache and others) and the signature some cache plugins write at the bottom of a stored page. A page counts as cached if either visit came from a cache.
We only ever send GET requests, so nothing is added to a cart or ordered. Our requests say who they are: Operanse-CacheCheck/1.0.
What it misses
- Caches that stand aside once a cart cookie is set. We arrive with no cookie, so we see what a first-time visitor sees. A cached empty cart is mostly harmless there, but WooCommerce’s advice is still to exclude these pages by address.
- Anything that only happens for logged-in customers, or in the visitor’s own browser.
- A firewall or bot check that stops us. The result says so rather than guessing.
- A cache with no header and no signature. “No cache seen” means none told us, not that none exists.
A check is one moment; a store runs all week
Operanse does not read your cache headers. It watches what a cached checkout does to a store, against what is normal for it.
On Monitor and Insight, Operanse learns what each hour of the week normally looks like for your store. Checkout errors above that normal, or orders below it, open an incident that says what it is costing, so a cache rule that started storing your checkout on Tuesday is a Tuesday alert rather than a slow month.
Watch, the free plan, would not catch this one. It mails you when the site is down or when the store can no longer take an order because its checkout or cart page has been removed or its last payment method switched off. A cached checkout is still there; it just does not work.
Questions
Is the address I enter stored?
No. It goes to our server only so the server can make the requests, and the result comes straight back to this page. Neither is written to a database or a log. Your IP address is used to limit how many checks one person can run, held in memory for an hour and not stored. Our page-view counter records that a check was run, never which store or what it found.
Can I check a store that is not mine?
Yes. We see what any visitor’s browser would see, nothing more. One store can be checked a few times every ten minutes, from anywhere, so the checker cannot be used to load someone’s site.
My home page is cached. Is that a problem?
No, that is what a page cache is for. Product and category pages are usually fine to cache too. It is the cart, checkout and account pages, and WooCommerce’s Store API under /wp-json/wc/store/, that must be built for each visitor.
It says “cacheable”. What does that mean?
The page was not stored this time, but its Cache-Control header tells caches they may store it. WooCommerce sends no-store, private on these pages, so something between WooCommerce and the visitor has replaced the header. It is worth finding before a cache that obeys it is added.
I fixed it. How do I check again?
Clear every cache layer you have (the plugin, the host’s cache and the CDN), then run the check again. If the same store has been checked several times in the last few minutes, you may be asked to wait.