June 2026 promo! Join our Discord free of charge.

Slick­Stack
Lightning-fast WordPress on Nginx

The website gets slow when something is added to cart.

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26313
    Olivia
    Guest

    Hello,
    The website gets slow due to cache bypass rule that bypasses the cache whenever Qty in cart is greater than 0.
    I used ChatGPT to find a solution:
    https://chatgpt.com/share/b9514999-f093-48e9-9e87-828a1ba4f004

    Let me know your thoughts on this.

    Regards

    #26314
    Louis
    Guest

    ???????????????????????????????????

    404

    #26317
    Emma
    Guest

    damn is chatgpt now spamming web forums? get the AI back in the lab!

    #26337
    Walter
    Guest

    I am using this configuration and its working fine. let me know if it works for you as well.

    ## Set default cache status
    set $skip_cache 0;

    ## Query strings should always skip the cache
    if ($query_string != “”) {
    set $skip_cache 1;
    }

    ## Skip cache for cart and checkout pages
    if ($request_uri ~* “/(cart|checkout|my-account|wc-api|wp-admin|login|register|order|view|dashboard|account|settings|contact)/”) {
    set $skip_cache 1;
    }

    ## Do not cache RSS feeds or sitemaps
    if ($request_uri ~* “/feed/|sitemap(_index)?.xml”) {
    set $skip_cache 1;
    }

    ## Skip cache for logged-in users and recent commenters
    if ($http_cookie ~* “wordpress_logged_in|wp-postpass|comment_author”) {
    set $skip_cache 1;
    }

    #26338
    Anna
    Guest

    I am using this code and its working fine for me.

    ## Set default cache status
    set $skip_cache 0;

    ## Query strings should always skip the cache
    if ($query_string != “”) {
    set $skip_cache 1;
    }

    ## Skip cache for cart and checkout pages
    if ($request_uri ~* “/(cart|checkout|my-account|wc-api|wp-admin|login|register|order|view|dashboard|account|settings|contact)/”) {
    set $skip_cache 1;
    }

    ## Do not cache RSS feeds or sitemaps
    if ($request_uri ~* “/feed/|sitemap(_index)?.xml”) {
    set $skip_cache 1;
    }

    ## Skip cache for logged-in users and recent commenters
    if ($http_cookie ~* “wordpress_logged_in|wp-postpass|comment_author”) {
    set $skip_cache 1;
    }

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: The website gets slow when something is added to cart.

Thanks to our generous sponsors for their support!