Migrating from “Exclude Pages” to “Cache Everything”

June 5, 2026

Many WooCommerce stores work around personalised pricing by excluding shop, product, and category pages from their full-page cache. That keeps prices correct but throws away the biggest performance win. This guide walks through switching to the opposite model: cache those pages and let Super Speedy AJAX Prices keep prices (and optionally stock) correct per visitor.

Before you start

  • Install and activate Super Speedy AJAX Prices, and confirm it’s working before you touch your cache rules — see Quick Start Guide.
  • Know where your current cache exclusions live (your caching plugin’s “Never cache” / “Rejected URLs” list, or your CDN/edge page rules).
  • Do this on staging first if you can, or during a quiet traffic window.

The migration, step by step

1. Confirm placeholders render

With the plugin active, open a category page and view source. Each price should be wrapped in <span class="ajax-price" data-product-id="…">. If you see those, the plugin is ready to take over pricing once the page is cached.

2. Remove shop/product/category from your cache exclusions

Find the rules that currently stop those pages caching and remove only the catalogue-page entries. Typical places:

  • Caching plugins: “Never cache the following pages” / “Rejected URL strings” — remove patterns matching shop, product, and product-category URLs.
  • CDN/edge: delete or narrow the “bypass cache” rule that covers catalogue URLs.

Leave cart, checkout, and my-account exclusions exactly as they are — those must stay uncached. See Caching Plugin Configuration for the full rule set.

3. Verify the AJAX endpoint is NOT cached

This is the one rule people miss when flipping to “cache everything.” Confirm admin-ajax.php (the get_wc_prices request) is excluded from caching at both the plugin and CDN/edge layers. If the AJAX response gets cached, every visitor receives the same prices.

4. Mirror your cache’s bypass behaviour in the settings

If your cache already bypasses logged-in users and/or has-cart sessions (most do), set the matching plugin options so AJAX pricing doesn’t run redundantly there:

  • Disable for logged-in users
  • Disable when cart has items

See Settings Reference.

5. Purge and test

  1. Purge your full cache.
  2. In a private window, load a category page and reload twice — confirm a cache HIT on the HTML.
  3. In DevTools Network, confirm the get_wc_prices request returns fresh JSON (not cached) and that prices update to the correct values after load.
  4. Test a few scenarios that matter to you: a different country/currency, a logged-in user, and a session with a cart item.

Verification checklist

  • [ ] Catalogue HTML is a cache HIT.
  • [ ] get_wc_prices is never cached (fresh JSON each load).
  • [ ] Prices on cached pages match what the visitor sees at checkout.
  • [ ] Cart / checkout / my-account are still excluded from cache.
  • [ ] Logged-in / has-cart behaviour matches your settings.

Rolling back

If anything looks wrong, you can revert instantly by re-adding your catalogue-page cache exclusions — the plugin keeps working either way (on an uncached page it simply renders the price server-side). Then diagnose with the Troubleshooting article before trying again.

What you should see afterwards

Catalogue pages now serve as fully-cached HTML (fast TTFB, no PHP per request) while prices and stock resolve per visitor via a single AJAX call. To quantify the improvement, see Measuring the Performance Win.

×
1/1