Wordpress LScache Plugin: Cache purge triggered on WooCommerce order status change
Last Updated on: Wed, 15 Apr 2026 00:00:02 When I change the status of a WooCommerce order, I see the notice Notified LiteSpeed Web Server to purge all LSCache entries. although orders are not displayed at the front end and they shouldnt be cached at all. The Purge tab only provides a setting for WHAT to purge, but not under what conditions to do it. This can cause an active store site to be uncached most of the time, which is definitely not a good thing. Also, pages should be purged from cache if they are related to the page thats changed. So if I change a post, theres no reason to purge the main shop page, but if I change a product, the shop page may need to change too. This can be achieved using post-type-based purge settings. Hi, I just set up a wooc site for test , but when I change the order status , like from processing to on hold , pending payment or completed . I dont see that purge all lscache entries message , also my front page still showing cache: hit Could you please specifies the steps how to trigger/reproduce the issue ? Best regards, I just edit an order, change the status and save. I have the following settings: Cache: only Favicon and PHP Purge: Purge All On Upgrade and All Excludes: Query Strings is nocache and Role Excludes is Administrator, SEO Manager Optimise: everything checked Tuning: CSS Excludes is woocommerce-smallscreen.css , URI Excludes is nocache and Role Excludes is Administrator WooCommerce: Product Update Interval is set to Purge product only when the stock status changes. Do not purge categories on changes to the quantity or stock status. All other settings are disabled In WooCommerce, stock management is enabled, and some products have stock management turned on, but Ive tested with an order for a digital variation, where the Enable stock management at product level is OFF and the variations Manage Stock is also OFF. Looks like the plugin might not be checking whether stock levels are actually being changed. Unfortunately, theres no option to disable purge for products, so I cant verify this. Hi, OK , could you please enable the advance debug log to your IP, then try same process, the log should record the purge tag ,lets see what it calls to purge. Best regards, [Purge] added => LSC_Purge->_add()@332 => LSC_Purge->_purge_all_lscache()@178 => LSC_Purge::purge_post()@676 => WP_Hook->apply_filters()@288 => WP_Hook->do_action()@312 => /home/gboldev/public_html/behappyinlife/wp-includes/post.php@478 => /home/gboldev/public_html/behappyinlife/wp-content/plugins/flamingo/includes/class-contact.php@4081 => Flamingo_Contact->save()@166 => Flamingo_Contact::add()@122 X-LiteSpeed-Purge: public,528_ X-LiteSpeed-Purge: public,stale,528_ In debug.purge.log: X-LiteSpeed-Purge: public,stale,528_ => LSC->send_headers()@680 => WP_Hook->apply_filters()@288 => WP_Hook->do_action()@312 => /home/gboldev/public_html/behappyinlife/wp-includes/load.php@478 Hi, LSC_Purge->_purge_all_lscache()@178 => LSC_Purge::purge_post() purge post leads to purge all action. Purge: Purge All On Upgrade and All if you checked all in purge setting , then any action will leads to purge all. please uncheck this action. Best regards, For Auto Purge Rules For Publish/Update , the admin page states Select which pages will be automatically purged when posts are published/updated . Looks like when I select only Recent Posts widget , Post type archive and Term archive , the purge isnt triggered on order save. WooCommerce orders are not posts, though. Is All not the same as ticking all the other checkboxes? Hi, Is All not the same as ticking all the other checkboxes? well , under the hood , its different , all will use for all , while if you check all other checkboxes , it will send individual tag for selected page. Best regards, Going back to the original issue, WooCommerce orders should be handled using the WooCommerce extension related to inventory level changes. They should not be considered a post type that triggers purging otherwise. Hi, I was discussing with our developers about this topic. Could you please clarify what exactly is your ideal way for purge workflow ? for example: when order-status-change should not trigger any purge UNLESS this product is sold-out ? Best regards, My view is that the only impact orders may have on the sites front end is through changes to stock levels that are actually shown. Some sites dont have inventory management turned on. On such sites, order status makes no difference, so either detect this automatically in the WooCommerce settings or provide a way to disable purging on stock level change Some sites have inventory management turned on, but stock levels are only displayed on single product pages, not product archives. On such sites, there should be a way to choose what to purge on stock level changes Some product types (virtual, downloadable) dont have inventory management turned on. Some specific products may also have it turned off. If an order only contains such products, there is no need to purge anything. If the plugin can detect stock level changes, it should only purge when stock levels actually change Order status changes may affect other pages via certain WooCommerce shortcodes/blocks, so the plugin should provide an option for purging pages containing those shortcodes/blocks I hope this helps (and I hope it covers everything). It may be good to reach out to the WooCommerce team, just in case.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference