• Resolved nimonogi

    (@nimonogi)


    How to prevent Mini Cart of getting cached? It’s showing empty on cached pages, even though there are products on the cart and it’s very confusing.

Viewing 15 replies - 1 through 15 (of 24 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @nimonogi,
    I did not get your question. Please share your website URL along with proper steps to reproduce the issue so that I can test them here.

    Thread Starter nimonogi

    (@nimonogi)

    Visit the website and add a product to cart. You will see that the mini cart on cached pages is showing no products on cart and if you visit https://ctrl.cy/cart/ (which is excluded from cache) you will see the product in the mini cart.

    Mini cart screenshot: https://imgur.com/a/FP0LExE

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @nimonogi,
    I can see you are using WooCommerce in your website. I will highly encourage you to take advantage of the new Cache Rule system and disable the Cache Everything page rule. Check the detailed guide here: https://gist.github.com/isaumya/af10e4855ac83156cc210b7148135fa2

    Makre sure to replace the example.com domain name with ctrl.cy. This will resolve your issue. Read the implementation guide thoroughly and implement the cache rule as suggested.

    Thread Starter nimonogi

    (@nimonogi)

    Thanks for the prompt reply. I have followed your instructions but I can’t find “Remove Cache Buster Query Parameter” option under the plugin settings.

    Thread Starter nimonogi

    (@nimonogi)

    Also, now it adds random products to the shopping cart.

    Thread Starter nimonogi

    (@nimonogi)

    I am using the worker mode btw.. I have disabled worker mode but still getting the same behavior. It adds a random product or two times the same product to the cart.

    • This reply was modified 1 year, 4 months ago by nimonogi.
    Plugin Contributor iSaumya

    (@isaumya)

    Mke sure you are using the most updated version of the plugin and disable the worker mode. You don’t need it when using cache rules

    Thread Starter nimonogi

    (@nimonogi)

    All set. Thank you. My initial problem however still persists. Mini cart on cached pages shows empty even after you add a product.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @nimonogi,
    Please share the following screenshots:

    1. Screenshot of the page rule section from your Cloudflare dashboard
    2. Screenshot of the cache rule section and the cache rule itself that you have added
    3. Scrrenshot of the workers section
    4. Screenshot of the plugin settings page showing worker is disabled
    5. Screenshot of the plugin settings page > others tab showing you have enabled the remove cache buster query param option
    Thread Starter nimonogi

    (@nimonogi)

    Screenshots: https://imgur.com/a/FlylzdQ

    Also I noticed under your rules “/checkouts/” is this correct or a typo?

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @nimonogi,
    You did not share the screenshot of the page rule section.

    Also yes the /checkouts/ will be /checkout/ fixing the typo now.

    Also couple of other things,

    1. Inside the plugin settings > others tab uncheck the option for prefetch links on viewport and prefetch links on mouse hover as they are not good for eCommerce sites
    2. Deactivate and delete the official Cloudflare plugin from your website. You cannot use the official Cloudflare plugin along with this plugin. When using this plugin you need to ensure that you are not using the official Cloudflare plugin in your website and you have also disabled APO inside your Cloudflare dashboard.
    Thread Starter nimonogi

    (@nimonogi)

    There was a rule there but I deleted it. No page rules now.

    Another question, shall I replicate the Cache Rules I enter on Cloudflare and enter them again under “Prevent the following URIs to be cached” section of the plugin?

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @nimonogi,
    I’m not sure if you are not reading my entire message or not.

    I clearly stated that you are using the official Cloudflare Plugin on your website (https://i.imgur.com/Lwo1FEx.jpeg), you need to uninstall the official Cloudflare plugin from your website and disable APO inside your Cloudflare dashboard if you have enabled it.

    Regarding the cache rule, I’ve fixed the typo so you can just make /checkouts/ to /checkout/ beside that you do not need to make any changes. Use the Prevent the following URIs to be cached section to bypass cache for certain URLs, no need to touch or modify the cache rule at all.

    Thread Starter nimonogi

    (@nimonogi)

    i do not use the cloudflare’s plugin nor any other cache plugin. APO is disabled in clouflare. I did tried APO a year ago and removed it the same day.

    Thread Starter nimonogi

    (@nimonogi)

    ps. When you are logged-in everything is working properly.

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Prevent Mini Cart of getting cached’ is closed to new replies.