Site logo

[Support request] Litespeed Cache breaks Menu Cart

Home Forums Support [Support request] Litespeed Cache breaks Menu Cart

Home Forums Support Litespeed Cache breaks Menu Cart

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2561020
    Gilles

    Hi
    I have integrated your code (https://docs.generatepress.com/article/hide-cart-in-menu-when-empty/) to not display the cart in the menu if it is empty.
    it works. But I have a small problem, probably related to the cache system I use (Lite speed cache).
    Indeed, after an addition to the basket, if I return to a page previously displayed (before the addition), the basket does not appear in the menu.
    I guess I need to exclude the menu (or just the cart widget ?) from cache menu?
    If so, please tell me how to proceed?

    #2561022
    Fernando
    Customer Support

    Hi Gilles,

    Can you share the link to the site in question?

    You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    #2561024
    Gilles

    Hi Fernando
    Of course. It’s : https://www.un-jardin-bio.com/

    #2561059
    Fernando
    Customer Support

    I can confirm that it’s a caching issue. You can test this out by adding /?nocache at the end of your URL.

    What caching are you using? It would be best to check with them regarding this. It would also be good to check if your Hosting Provider has some caching enabled on your site as well.

    #2561097
    Gilles

    I use Lite Speed Cache.
    But their support is almost non-existent… and I know in advance that they will refer me to you…
    There is no server-side caching.

    #2561231
    David
    Staff
    Customer Support

    Hi there,

    does the cart work as expected without the LS Cache plugin enabled ?

    #2561273
    Gilles

    Hello David,
    Yes of course. By the way, caches are disabled on the Shopping Cart page.

    #2561319
    David
    Staff
    Customer Support

    I had a look around for some answers, seems other users have had similar issues, but most LS support topics or docs bare no resemblance to the plugin today. And i am not familiar with it aside from the issues that it causes some users.

    A couple of docs recommend:

    Litespeed -> Cache -> Excludes –> Do Not Cache Cookies and add this: woocommerce_items_in_cart

    To stop it caching cookies.

    Give that a try.

    #2561364
    Gilles

    It works !
    Thank you very much.

    #2561412
    David
    Staff
    Customer Support

    Wow – i am so glad to hear that 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.