Stock issue with Product bundles




Wordpress LScache Plugin: Stock issue with Product bundles

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hey there, I am currently testing LS cache on a staging subdomain. Ive adjusted the LS cache Woocommerce settings so that when I make a purchase, the product page gets purged. This is happening for simple products, which is wonderful. My problem is that I have many product bundles (many of which contain said product) and those pages dont get purged. This results in the customer seeing inaccurate stock values on bundles. Is there a way to purge Product bundles that include a product when that products stock status changes? Alternatively (but less than ideal) is there a way to exclude product bundles from cache entirely? The page I need help with: http://strikk.no Hi, May I know what option you chose in wooc tab ? there are 4 options , which one you set ? best regards, Apologies, I should have included that information. Currently Im on Always purge both product and categories on changes to the quantity or stock status . I should also mention that the Product bundles are almost entirely comprised of product variations. So just to be clear: when purchasing Bundle A, which is comprised of product 1 (with predetermined quantities of variations I, II and III), the cache for the single product page of product 1 gets purged (which is desired and expected), but not the cache for Bundle A. Hi, May I know how this bundling come from ? is that Wooc Native feature or you get it by some other plugin ? Best regards, Its from Woocommerce Product Bundles (SomewhereWarm). I could have sworn I read Litespeed was compatible with it but upon checking just now it seems I misread. I have been reading about Litespeeds API and cache tags since first talking to you and it seems that would be the solution. My bundles all have the same product category. So I can easily pinpoint them and assign a tag to them upon saving the bundle, with LiteSpeed_Cache_API::tag_add. My problem is that the tag disappears as soon as the cached page is generated. I would need it to persist, so that I could tell Litespeed to purge products containing that tag when stock changes. Is there a way to add tags at the moment when the cached page is generated? Hi, Usually , you will see x-litespeed-tag: tag1 , tag2 , tag3 , tag4 alone with x-litespeed-cache: miss by that means : when you see miss , you will see tag header when you see x-litespeed-cache: hit , the tag header will be hidden , but the tag should still be there. if you see tag is being added by API , but when you call to purge that tag, it doesnt , then it probably a server-side bug. You can use debug log to check what tag(s) has been added to certain page , then try to purge by tag, and see if it works. Best regards, Oohhh, I see. I thought the fact that I couldnt see it meant it was gone. They will still disappear after a purge though right? So I would have to call the purge and then reassign the tag right after? Ah never mind. Of course, if I set the tag to be assigned when the page is visited, then it will always be there when it gets cached after the purge. One question though, you say You can use debug log to check what tag(s) has been added to certain page . Debug shows me what tags were purged but I cant see which ones were added. Where do I find this? Hi, Please check this wiki In log , you will see an entry like this 06/24/18 20:55:54.411 [1.2.3.4:31844 1 mIO] X-LiteSpeed-Tag: 87f1_URL.6666cd76f96956469e7be39d750cc7d9,87f1_F,87f1_Po.24,87f1_PGS,87f1_ Best regards, Im not seeing that anywhere in the log, which is strange because the tags are in the response headers the first time I load the page. I do see the purges though. X-LiteSpeed-Purge: I must be doing something wrong. edit: Alright I found it. I didnt realize the basic/advanced debug had different files. Hi, Is everything good ? Best regards, Yes, sorry about the late reply. Everything is working Glad to know !



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



Reference