WooCommerce, LiteSpeed cache and Mini Cart

#1
Hi,

I'm having some trouble with the mini cart that stay cached with Ls Cache. I'm using WooCommerce and the MiniCart widget on my left menu (so always displayed). The MiniCart remains cached empty at 0 when I'm adding a product. I have the sliding drawer opening from the right when I'm adding a product in the cart, it is supposed displaying the cart content but indicate that the cart is empty. Sometime the cart is updated on my shop page but when I'm navigating back on the homepage it goes back to zero.
If I'm disabling the LsCache it works fine.
I've tried to add those cookie in LsCache exclusion :
woocommerce_items_in_cart
woocommerce_cart_hash
wp_woocommerce_session
woocommerce_recently_viewed
And I've also added RewriteRule .* - [E=Cache-Vary:woocommerce_cart_hash] in the htaccess but doesn't fix the issue.

The website : seewood.fr (cart is on the left menu), shop page is "boutique" on the left menu

Does anyone got an idea about that ?

Best regards
 

serpent_driver

Well-Known Member
#8
You are using O2Switch. This hosting provider does not offer a real LiteSpeed environment, as LiteSpeed is installed on a proxy. There is no LiteSpeed web server running on your own server, and therefore no LiteSpeed LScache cache engine. O2Switch therefore does not support Cache Vary. This means that Cache Vary cannot work for Mini Cart. You should therefore look for a hosting provider that provides LiteSpeed without restrictions.

Solution provided by Kitt, the fastest cache warmup crawler for LiteSpeed Cache. https://www.cachecrawler.com

Why do all French people use O2Switch? Are there no other hosting providers in France?
 
Last edited:
#9
Ahah shit, I'll check that with them
O2S is quite efficient and good offer, obviously if you don't need cache system on an e-shop

thanks for your reply
 

serpent_driver

Well-Known Member
#10
If you (O2Switch) don't offer much, you can offer cheap hosting plans. That's why you (like many French people) seem to have fallen for the marketing.

I have many French customers, but 9 out of 10 always have the same problem with O2Switch.
 
#11
I mean, it's not especially cheap, but server are quite performing and support is way better than OVH, I'm thinking about hostinger to switch my websites, would you recommend it ?
 

serpent_driver

Well-Known Member
#12
You have WooCommerce, so the priority is not by the hosting provider, but the kind of hosting. WooCommerce needs a VPS at least, because it is consuming much resources. Shared hosting doesn't meet such requirements.
 
#16
Hello i have the same problem with my minicart, I checked all the steps you say but nothing.
My site is darklight3d.gr and is on hostinger.
 
Top