Problem with woocommerce notices and litespeed cache




Wordpress LScache Plugin: Problem with woocommerce notices and litespeed cache

Last Updated on: Wed, 15 Apr 2026 00:00:02
When LS Cache is on, the woocommerce notices stop working as intended. For example adding product to cart doesnt show the Product added to cart notice, but when you go to another page the notice from the previous page is displayed on that page. I would like to know if there is any solution to it, right now we turned the cache off completely. Hi, from my knowledge , when you add order , that is a POST request and refresh the page , when that happens , POST request wont be cached , it should show up that way , at least thats what I see in WP + WOO + StoreFront theme please verify how was product added on your site Best regards, Started working as expected again after updating woocommerce and flushing all. I suspect there were some issues with cached js, cannot confirm though as I didnt have time to look into it. Ok, there is definitely something wrong with how this works. Turns out notifications are persistent, they dont disappear and page ends up being cached with the notification displayed. On the product page when product is added to the cart it says Product has been added to your cart . After refreshing or leaving the product page and coming back the notification is still there. It is cached globally, when accessing the same page from different browser it displays page from cache with Product has been added to your cart notification, even though it is not in your cart. This stays like that until LS cache is flushed. Edit. Turns out you have to add the product to cart in order to see the buggy cached page. On one browser in private mode I force woocommerce to show two added to cart notifications. On another browser I add the product once and see two notifications from the other browser. It seems to be directly related with ls cache since can still be reproduced with other plugins disabled. Could this be related to some of the ls cache options? Turning cache off solves the problem. Hi, Did you enable object cache ? also try use the default setting first , see how it goes best regards, Did you enable object cache ? Yes, it was enabled, should it be disabled? Settings look good, but I guess Ill give it a go and see if anything changes. Nothing works. Is it possible to load woocommerce-message class as esi blocks? I think that would solve it. please verify how was product added on your site Could you elaborate on that? @CacheCrawler Hi, have you been able to reproduce it or made any progress on it? The issue only happens when user is not logged in. Guests have persistent messages that are cached as a part of the website and they dont show the correct value. Users who are logged in have the messages shown up correctly. I think I already tried to edit most of the options to no avail. There is an option to cache users with session started, but it doesnt affect the behavior of the messages. There seems to be a difference between how guests and logged users are cached. Hi, no on my test , it works with latest version on Woo , LSCWP , and WP whats the response header you see after you added product ? Yes, adding product for the first time works ok. After adding first product to the cart add it again, but this time 2 units of it. In our case this is what happens: For logged in users. 2x Polo has been added to your cart. For guests/users not logged in. Polo has been added to your cart. i.e. the cached version of the page when item was added to the cart for the first time. Then, after moving to different page, the correct notification appears (2x Polo has been added to your cart.). Should I be looking at anything specific in the response header? In both cases its POST with 302 and then GET with 200. It works the same way with cache disabled. Do you have any demo page or do you know any shop that is using ls cache? I would like to check it for comparison. @CacheCrawler Hi, can you please provide a link to the website you use for testing? I wanted to check it and compare. Thank in advance. please create a ticket by mail to support at litespeedtech.com with reference link to this topic I have exactly the same problem.How to solve this problem?



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



Reference