purging cache on price change




Wordpress LScache Plugin: purging cache on price change

Last Updated on: Wed, 15 Apr 2026 00:00:02
hey guys the products price changes hourly on my site, the woocommerce section on the plugin says that the cache is purged only when the stock quantity and status change. how can I auto-purge it when the price changes as well ? Hi, How does the price changes ? by itself ? I assume some cron job in place or something ? Best regards, exactly, its a dropshipping site, so with each update it checks the origin price and local price and syncs them up Hi, then when you sync it , you can call a purge API https://docs.litespeedtech.com/lscache/lscwp/api/#purge Best regards, isnt there a way to not cache the price field at all, in the excludes ? Hi, well , if you have looked through that doc you will find do_action( litespeed_purge_url, /my-product/page ) do_action( litespeed_purge_post, $post_id ) do_action( litespeed_purge_posttype, product ) you can use first one to purge by URL , if your sync process have one second one to purge by product ID , you can pass in by $post_id or 3rd one , purge all product page once sync process is done ??- technically yes https://docs.litespeedtech.com/lscache/lscwp/api/#generate-esi-block-url but this will require a lot of more custom code to implement ESI block a purge call will be simpler solution Best regards, hey mate, thanks for replying again i did which is why I edited my reply to ask if I can just not cache the price field yes, I edited my reply as well : ) gotcha, thanks



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference