Guangzhou, Guangdong Province
The guy was lazy and didn't write anything...
January 8, 09:38
This is common, especially when using an e-commerce plugin (e.g. WooCommerce) with page caching turned on. The main purpose of caching is to speed up loading, but it can lead to **delayed refreshes of dynamic data (e.g. inventory, prices, cart counts)**. This can be troubleshooted step by step in the following ways:
1. Check the caching plugin's exclusion rules
Most caching plugins allow "exclude from caching" settings for specific pages or parameters.
You should make sure that the following types of pages are excluded: /cart/, /checkout/, /my-account/, /cart/, /checkout/, /my-account/ and /my-account/.
Product detail pages (if inventory or prices are dynamically loaded)
In either LiteSpeed Cache or WP Rocket's settings, there is a "Do not cache these pages" option, which can be added with a regular expression such as:
^/cart/
^/checkout/
^/cart/ ^/checkout/ ^/product/
2. Check WooCommerce's AJAX refresh mechanism.
WooCommerce typically uses AJAX for cart and inventory updates.
If the theme or a third-party plugin disables the default WooCommerce script (e.g. removes wc-cart-fragments.js), it may cause the updates to go out of sync.
Workaround: Open the theme's functions.php and make sure the script is not disabled. Check in your browser developer tools to see if any AJAX requests are returning errors.
3. Clear Object Cache and CDN Cache
If you are using Redis Object Cache, Memcached, or Cloudflare CDN, you need to clear both:
Page Cache
Object Cache
CDN Cache
Otherwise the page may still load the old version of the data.
4. Check if the price is controlled by a third-party plugin
Some dynamic pricing plugins (e.g. WooCommerce Dynamic Pricing) perform logical calculations on the front-end. If the caching plugin outputs static pages in advance, the pricing logic will not be executed.
You can enable "Compatible Cache Mode" in the settings of the plugin or exclude these pages from the caching rules.
5. Enable debug mode to observe cache hits.
In the debug log of WP Rocket or LiteSpeed Cache, you can see cache hits (HIT) or misses (MISS).
Observe the HTTP headers on each refresh:
x-litespeed-cache: hit
x-litespeed-cache: miss
If the hit persists and the content is not updated, the cache rules are not set correctly.
Comments on:WooCommerce price updates blocked by cache?





