Havenswift Hosting Ltd
All guides

Caching WooCommerce correctly, and what must never be cached

Caching is the biggest performance win available to a shop, and the fastest way to break one. The rule is simple: cache what is the same for everybody, never cache what is personal.

Never cache these pages

If these are cached, one customer sees another customer's basket, or their name and address at checkout. Most caching plugins exclude them automatically, but you must confirm it rather than assume โ€“ particularly if your pages use non-standard names or you are on a non-English site where the slugs differ.

Also exclude

Cookies matter

WooCommerce sets cookies when a basket has something in it. A properly configured cache will bypass itself for a visitor carrying those cookies, so a shopper with items in their basket always gets a fresh page. If your cache ignores cookies, the mini-basket in the header will show the wrong contents โ€“ the classic symptom of caching set up without regard for WooCommerce.

Testing it

Add something to the basket in a private browser window, then open the shop in a different browser entirely. The second browser must show an empty basket. If it shows the first browser's items, stop and fix the cache before going any further.

What to cache

Product pages, category pages and the home page โ€“ the pages that are identical for everyone and make up the bulk of your traffic.

Other guides

Still stuck? Sign in and raise a ticket, and somebody will answer it.

Sign in