WooCommerce Cache Exclusions: Cart, Checkout, Cookies and Plugin Rules

Cache product pages aggressively. Never cache cart, checkout, or account pages. This reference table shows the exclusions and cookies for the main cache plugins, tested on staging.

WooCommerce cache versus never cache infographic: cache product and category pages, never cache cart, checkout, and account pages

WooCommerce Cache Exclusions: Cart, Checkout, Cookies and Plugin Rules

Cache exclusions are the most important WooCommerce cache setting, and the most dangerous to get wrong. Get them right, and product pages load fast for logged-out visitors. Get them wrong, and shoppers see each other’s carts, checkout breaks, or discount codes stop working.

This post is a reference, not a copy-paste-and-forget list. Plugin settings change by version, and your theme and plugins change which pages are dynamic. Test every rule below on staging, with the test at the end of this post, before applying it to live.

For full plugin comparisons, see the best WordPress cache plugins review.

What Must Never Be Cached in WooCommerce?

  • Cart page: shows a personal cart. Caching it can show the wrong cart to the wrong shopper.
  • Checkout page: shows personal details, shipping, payment, and order totals. Never cache it.
  • My Account pages: orders, downloads, addresses, and account details are personal. Never cache them.
  • Any page with a logged-in shopper’s data: if the page changes because of who is logged in, do not serve a cached copy to everyone.
  • Pages with dynamic pricing, discounts, or stock that must be current at checkout: cache the product page, not the checkout calculation.

Product, category, and blog pages for logged-out visitors are normally safe to cache, provided the exclusions below are in place and your theme does not put a live mini-cart count in the cached HTML without fragments or another dynamic mechanism.

Which Cookies Break Caching?

Cache plugins use cookies to decide whether to serve a cached page or a dynamic page. The key WooCommerce cookie is woocommerce_items_in_cart. When a shopper has items in cart, that cookie is present, and a correctly configured cache should bypass page cache for that shopper, or at least for cart/checkout/account pages.

Other cookies that can affect caching include:

  • woocommerce_cart_hash – cart contents hash, used to detect cart changes
  • wp_woocommerce_session_* – WooCommerce session cookie for the shopper
  • wordpress_logged_in_* – logged-in user cookie; logged-in users should normally bypass page cache
  • Plugin-specific cookies for currency, location, or membership, if your store uses them – these must be checked per plugin, because a cached page in the wrong currency or membership level is a broken page

If a cache plugin is configured to ignore these cookies, or a CDN cache rule caches cart/checkout regardless of cookies, you will get intermittent, hard-to-reproduce bugs. That is why “sometimes checkout shows the wrong cart” is often a cache exclusion problem, not a WooCommerce bug.

Rules by Plugin: WP Rocket, LiteSpeed, FlyingPress

Verify these setting names in your installed version. Do not apply a rule from an old screenshot without checking your version.

PluginPages to exclude (never cache)Cookie / user exclusions to check
WP RocketCart, Checkout, My Account – check Advanced Rules > Never Cache URLs, and confirm WooCommerce pages are listed there by default in your versionLogged-in users bypass cache by default; check that woocommerce_items_in_cart and session cookies are not ignored
LiteSpeed CacheCart, Checkout, My Account – check Cache > Excludes > Do Not Cache URIs, and confirm WooCommerce exclusions are presentLogged-in users and WooCommerce cookies should bypass cache; check Do Not Cache Cookies / Roles settings in your version
FlyingPressCart, Checkout, My Account – check Cache > Exclude Pages, and confirm WooCommerce pages are excludedLogged-in users bypass cache; check cookie exclusions for WooCommerce session/cart cookies in your version

For all three: after changing a rule, purge all cache, then test. A stale cached cart page can survive a settings change if you do not purge.

WooCommerce cache versus never cache infographic: cache product and category pages, never cache cart, checkout, and account pages
Figure 1: Cache product and category pages. Never cache cart, checkout, or account pages.

Verify each rule in your installed plugin version on staging before applying it to live, and note any version-specific setting name change there. No rule here is presented as tested on a specific store until that staging test is done.

Cache exclusions test infographic showing add to cart in one browser, check empty cart in a private browser, test checkout, check my account, purge cache and repeat
Figure 2: Test exclusions with two browsers — one shopper’s cart must never appear in the other browser.

How to Test Cache Exclusions on Staging

  1. Add a product to cart in Browser A, as a test shopper.
  2. Open the same cart and checkout pages in Browser B, in a private window, with no login and an empty cart. You should not see Browser A’s cart.
  3. Open a product page in Browser B. It may be cached, and that is fine, provided the mini-cart count in Browser B does not show Browser A’s count.
  4. Complete a test checkout in Browser A, in test payment mode. Check that totals, discounts, and shipping are correct, and that the order appears in admin.
  5. Log in as a test customer in Browser B, and check My Account. You should see only that test customer’s orders.
  6. Repeat after purging cache and after changing any cache rule. A rule that passes once, before a purge, has not been tested.

If any step fails, revert the last cache change first, purge cache, and re-test. Do not add more cache rules on top of a failing test.

Once exclusions pass, measure the cached product pages with the best WordPress speed test tools.

Related in this series: Slow WooCommerce Admin, WooCommerce Cart Fragments, and the complete WooCommerce Speed Optimization guide.

Common Questions

Frequently Asked Questions

Straight answers about what never to cache, the cookies that break caching, and how to test exclusions before they reach live shoppers.

Cart, checkout, My Account, and any page that shows personal cart, order, or account data for a specific shopper.

Mainly woocommerce_items_in_cart, woocommerce_cart_hash, wp_woocommerce_session_*, and wordpress_logged_in_*. A cache that ignores these cookies can serve the wrong cart or account page.

They normally include WooCommerce exclusions by default, but you must verify them in your version, test them on staging with the private-browser test above, and purge cache after any change. Default settings are not a substitute for testing.

Product, category, and blog pages for logged-out visitors are normally safe to cache, provided they do not show personal data and your cart, checkout, and account exclusions are working. If a page changes because of who is logged in, do not serve a cached copy to everyone.

Test on staging with two browsers. Add a product to cart in Browser A, then open the same cart and checkout pages in a private window in Browser B, with no login and an empty cart. Browser B should not see Browser A’s cart. Then complete a test checkout in Browser A, log in as a test customer in Browser B, and check that My Account shows only that customer. Repeat after purging cache and after changing any cache rule.

Revert the last cache change first, purge cache, and re-test. Do not add more cache rules on top of a failing test. A rule that passes once, before a purge, has not been tested, so repeat the test after purging and after changing any cache rule.

Keep reading

  • Best hosting for WooCommerce, what to check before you choose, explained by ProSpeedGuy

    Best Hosting for WooCommerce: What to Check Before You Choose

    What does WooCommerce hosting need to handle? A store is not a…
    October 27, 2026
  • Which WooCommerce plugins slow down your store, and how to test them, explained by ProSpeedGuy

    Which WooCommerce Plugins Slow Down Your Store? How to Test, Not Guess

    Why do plugins slow a WooCommerce store? To answer which WooCommerce plugins…
    October 27, 2026
  • Speed up WooCommerce product pages without losing sales, explained by ProSpeedGuy

    WooCommerce Product and Category Page Speed: Fast Pages That Still Sell

    Why are product and category pages slow? A slow WooCommerce product page…
    October 27, 2026

One response to “WooCommerce Cache Exclusions: Cart, Checkout, Cookies and Plugin Rules”

  1. […] measure the result with my best WordPress speed test tools guide. If you run a store, read the WooCommerce cache exclusions rules first, and see the wider plan in the WooCommerce speed optimization complete […]

Leave a Reply

Your email address will not be published. Required fields are marked *