Caching Plugin Configuration

June 5, 2026

Super Speedy AJAX Prices only pays off when your catalogue pages are actually full-page cached. Getting the cache rules right is the single most important configuration step — and the most common cause of problems. This article covers the universal rules and the specifics for popular caching layers.

The three universal rules

Whatever caching layer you use, the rules are the same:

  1. Cache your shop, product, and category pages. These are the pages the plugin is built to make cacheable. Do not add them to any “never cache” list.
  2. Exclude cart, checkout, and my-account pages. These are per-visitor and must never be served from a shared cache. WooCommerce flags these, and most caching plugins exclude them by default — confirm it.
  3. Never cache AJAX requests. The plugin’s price/stock data comes from admin-ajax.php (action=get_wc_prices). If that response is cached, every visitor receives the same prices — defeating the whole point. Most caches already bypass admin-ajax.php; confirm it.

If those three are correct, the plugin works. Everything below is just where to set them.

Why the “disable” settings exist

Most caching layers already bypass the cache for logged-in users and for sessions with items in the cart (because those pages are personalised). In those states the page isn’t cached, so it already renders the correct price server-side and AJAX pricing is redundant. The plugin’s two settings —

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

— let you switch AJAX pricing off in exactly those states so it mirrors what your cache is doing. Set them to match your cache’s bypass behaviour. (See Settings Reference.)

Per-plugin notes

WP Super Cache

  • Settings → WP Super Cache → Advanced: enable caching. WooCommerce cart/checkout/account are excluded automatically when WooCommerce is active; verify under Advanced → Rejected URL Strings if needed.
  • Cart/checkout/account are also excluded by Woo’s “Do not cache” cookies. Leave product/shop pages cacheable.
  • WP Super Cache does not cache admin-ajax.php POST requests, so the AJAX endpoint is safe by default. (This is also the cache the test rig’s real-cache spec runs against.)

W3 Total Cache

  • Page Cache → enable. Under Page Cache → Advanced → Never cache the following pages, confirm cart, checkout, my-account* are listed (W3TC adds them for WooCommerce).
  • Do not list shop/product/category patterns there.
  • Leave “Cache AJAX requests” style options off for admin-ajax.php.

LiteSpeed Cache

  • LiteSpeed auto-excludes WooCommerce cart/checkout/account via ESI/Woo integration. Keep that on.
  • Under Cache → Excludes, do not add shop/product URLs.
  • ESI is not required for this plugin — the per-visitor data comes through AJAX, not ESI holes.

WP Rocket

  • Cart/checkout/my-account are excluded automatically with the WooCommerce add-on. Verify under Advanced Rules → Never Cache (URLs).
  • Leave shop/product/category cacheable.
  • Rocket doesn’t cache admin-ajax.php, so the endpoint is fine.

Cloudflare / edge / “cache everything”

Edge full-page caching (Cloudflare APO, “Cache Everything” page rules, Fastly, etc.) is where this plugin shines, because edge caches can’t run PHP per visitor. Configure: – A page rule / cache rule that caches shop/product/category HTML. – Bypass rules for /cart, /checkout, /my-account, and for the WooCommerce session/cart cookies. – Bypass admin-ajax.php (don’t cache POST; most edges don’t cache POST anyway).

Because an edge cache often ignores logged-in/cart cookies unless told otherwise, the client-side Disable when cart has items setting (which reads the woocommerce_cart_hash cookie in the browser) is a useful safety net at the edge.

Verifying the cache + plugin together

  1. Open a category page in a private window, reload twice. Confirm a cache-hit header (x-cache: HIT, wp-super-cache footer comment, etc.).
  2. In DevTools Network, confirm the page HTML is a cache hit and that the admin-ajax.php get_wc_prices request is not cached (it should return fresh JSON every load).
  3. Confirm prices still update to the correct values after the cached HTML loads.

If the HTML is cached but prices never change, your AJAX request is probably being cached — fix rule 3. See Troubleshooting for more.

×
1/1