Knowledgebase

Caching a WooCommerce Store Correctly Print

  • woocommerceonlinestores, woocommerce, caching, plugins, performance, troubleshooting, guide, howto
  • 0

Caching is essential for a shop and dangerous if configured carelessly.

WHAT MUST NEVER BE CACHED

Cart Checkout My Account Any page showing information specific to one logged-in customer

Caching these serves one customer's cart or details to another. It is the most serious caching mistake possible on a shop.

SETTING IT UP

LiteSpeed Cache detects WooCommerce automatically and excludes those pages. Confirm it has, rather than assuming.

If you use a custom cart or checkout page, add it manually under the plugin's Do Not Cache URIs.

WHAT SHOULD BE CACHED

The shop page, category pages and product pages. These are the same for everyone and are where most traffic goes.

AFTER ANY CHANGE

Purge the cache. Prices and stock updated but still showing the old values is almost always a stale cache.

TESTING

Add something to the cart, then open the site in a private window. If you see a cart with items in it, caching is wrong. Fix it before launch.

ALSO

Exclude the cart fragment requests from caching, or the cart count in the header stops updating.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot