Have also excludes /basket from Do Not Cache URIs
Hi, rockpeach.
LSCache should absolutely work with WooCommerce, so it’s probably just a matter of tweaking one of the settings.
Please provide your Report Number, found in WP Admin > LiteSpeed Cache > Report so we can have a look at your settings.
Thanks!
Hi Lisa,
Really hope to make it work
Report number: FPUQDXSM
Thanks!
Hi, rockpeach.
This report indicates you are using an Apache server. Is that correct?
If so, then the caching functions of LiteSpeed Cache won’t work for you. You can only use the optimization functions, if you have a non-LiteSpeed server. This means, no matter what you do in the Cache settings, or the Do Not Cache settings, it will not have an impact on your site. Those functions are disabled.
Whatever caching issues you are having with WooCommerce, I’m afraid they have nothing to do with LSCache, and so we can’t offer a solution (aside from the suggestion that you ask your hosting provider about LiteSpeed Web Server). Sorry!
Lisa
P.S. The LSCache plugin should be displaying a warning about the caching functions being disabled. If you are not seeing that warning, please let us know!
Lisa,
Yes that’s correct, well my plan is to use LiteSpeed server but tried this weekend setting up OLS for testing and while I could have it listened on port 80 I couldn’t have it listened on port 443. Should I use Cyberpanel to install it? Wondering if the issue is coming from my SSL certificates. I didn’t use cyberpanel for this test and followed this guide but really couldn’t make it work
The .htaccess is being modified so I though this plugin was having an effect. Disabling this plugin fix the issue with the cart
Thanks
Hi, rockpeach.
You might want to visit our OpenLiteSpeed forums, or our Slack community and check there for some help getting OLS configured for your needs.
Good luck!
Lisa
Hi Lisa,
I hope you don’t mind me reopening this topic as I’m now testing from a new server using Litespeed Pro Server and I’m still getting the same issue. I installed cyberpanel it through cyberpanel
And I’m still getting the same issue: Logged in users would add products in the cart but then when going to the cart, cart is empty.
Steps done:
1/ Adding in Excludes > Do not cache cookies:
woocommerce_items_in_cart
woocommerce_cart_hash
2/ Adding in Excludes “/basket” to “Do Not Cache URLs”
3/ I can NOT add to the .htaccess the 2 lines below otherwise I get a 404 error:
RewriteRule .* – [E=Cache-Vary:woocommerce_items_in_cart]
RewriteRule .* – [E=Cache-Vary:woocommerce_cart_hash]
Report number is: XYXKKDBU
Thanks!
Hi, rockpeach
Have you tried this without excluding the WooCommerce cookies?
The Enterprise edition of LiteSpeed Web Server supports ESI, which is a much better way to cache your WC site. If you enable ESI (go to Settings > ESI), then the plugin should automatically make your WC cart into an ESI block, and treat it as private cache. Just make sure you remove woocommerce_items_in_cart and woocommerce_cart_hash from Do Not Cache Cookies.
You shouldn’t have to edit .htaccess, either, if you do it this way.
Let us know if that works. If it doesn’t, we may need you to open a ticket so we can dig a little deeper.
Hello,
After talking to your support, disabling Redis object caching fixed this issue
Thanks to you and your team for this help!
Regards