Optimizing cache with wp-rocket plugin. Best options

This topic has 8 replies, 2 voices, and was last updated 17 minutes ago ago by javi_web

  • Avatar: javi_web
    javi_web
    Participant
    September 11, 2026 at 18:13

    Hello,
    In order to improve my website performance I would like to ask you if you recommend any options for WP-Rocket.
    Now my website load quick only when the requested URL is cached. But, I have realized that the cart icon doesn’t show the real cart products added. So user are not able to arrive to the cart page.

    Could you help me?

    Please, contact administrator
    for this information.
    7 Answers
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    September 14, 2026 at 06:42

    Hello, javi_web,

    The issue with the cart icon not updating correctly is typically caused by caching WooCommerce dynamic elements or AJAX requests. Below are the recommended WP Rocket settings and steps to resolve this issue and optimize your site:

    To fix the WooCommerce Cart Issue
    – Exclude WooCommerce Pages from Caching: WP Rocket automatically excludes WooCommerce pages such as Cart, Checkout, and My Account.
    Ensure these pages are correctly set in WooCommerce > Settings > Advanced and are not listed in WP Rocket under Advanced Rules > Never Cache URL(s).
    – Enable WooCommerce AJAX Fragments
    – Purge Cache & Clear CDN Clear the WP Rocket cache and any server-level cache (e.g., Cloudflare, Varnish, or NGINX cache) after applying changes.

    Recommended WP Rocket Options for WooCommerce & XStore
    – Minify CSS & JS – Enable both to reduce file sizes.
    – Optimize CSS Delivery / Load CSS Asynchronously – Enable this, but test carefully. If the mini-cart styling breaks, exclude the theme’s core CSS files.
    – Delay JavaScript Execution – Enable this feature to significantly improve performance scores. If the cart dropdown/icon relies on JS scripts, exclude them under Scripts to exclude from delay (e.g., cart, woocommerce, or specific theme cart scripts).
    – Enable LazyLoad for images and iframes.
    – Add dimensions to missing images to prevent Layout Shift (CLS)..

    If the cart issue persists after applying these settings, please let us know so we can inspect your configuration directly using the provided credentials.

    Best Regards,
    8Theme’s Team

    Avatar: javi_web
    javi_web
    Participant
    October 11, 2026 at 22:33

    Hello Andrew,
    Regarding WP-Rocket all the recommendations were applied. Cache pages works like a charm.
    But, what “Enable Woocommerce AJAX Fragments” is?

    I am suffering performance issues. All no-cached pages have a TTFB of 10s aprox.
    So, I have some questions:
    – Could be possible serve cache-pages and check cart widget asynchronously? If so, how.
    – Could be possible add a cart button to the header that doesn’t show the number of products in cart? Only to be sure the user arrives to the cart page (now they can’t, empty cart is always shown).
    – ChatGTP said me that dynamic URLs in megamenus are responsible of part of the performance issue, what do you think about that? Only the main menu contains almost 200 links.
    – The server has: OPcache, nginx, redis, … . How can I find out the origin of such horrible TTFB?

    Thank you!
    Regards,
    Javi.

    Avatar: javi_web
    javi_web
    Participant
    October 13, 2026 at 12:09

    Hello Andrew,
    Following with the previous comment, a related issue: Despite of I have added a product to my cart and a cookie is present, why cart icon doesn’t show the right number? (Screenshot attached)

    Please, if reset cache files should be necessary let’s me know in order to find a low traffic window time.

    Regards,
    Javi.

    Files is visible for topic creator and
    support staff only.
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    October 14, 2026 at 07:49

    Greetings, may we update your theme and plugin? We have noticed that you are currently using version 9.7.8, while the latest version available is 9.7.10.

    Best regards,
    8Theme’s Team

    Avatar: javi_web
    javi_web
    Participant
    October 14, 2026 at 09:35

    Hello Andrew,
    Not now, if you think it’s necessary, I’ll do and lets you know.

    In my opinion, the update will not resolve the issue, and you could answer my questions without do it. Anyway, rules are established for good reasons. I’ll write to you ASAP.

    Regards,
    Javi.

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    October 14, 2026 at 17:30

    In this case, you need to enable the following theme options in the XStore options under the Speed Optimization tab:

    – Static block cache
    – CSS Minification
    – Forced cache
    – Remove query strings from static resources

    Regarding the WooCommerce hash, we have noticed that it is already disabled in your theme options. However, a hook from a third-party plugin is still enabling it with a higher priority. To identify which plugin is responsible, we need to disable them one by one and check. We have not done this yet, as it may affect the website’s functionality.

    Best regards,
    8Theme’s Team

    Avatar: javi_web
    javi_web
    Participant
    October 27, 2026 at 18:09

    Hi Andrew,
    After doing some testing locally, I will enable static block cache as you recommended me.
    Besides, I would like to share with you two suggestions or issues:
    – About et-core-plugin. Your Elementor Header Cart widget always loads wc-cart-fragments (cart.php:360), even after the theme option removes it.
    – Your code has two bugs related with static block cache and menu cache, both confirmed locally:
    – Styles disappear. When a block is served from the cache, Elementor never loads that block’s CSS, so stylesheets vanished from the page and the mega menus would show up unstyled.
    – The cache never refreshes. XStore never clears it, so when I edit a mega menu or a category, the old version stays until Redis cache is forced to refresh.

    Thank you.
    Regards,
    Javi.

  • Viewing 8 results - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.