Problem with full page caching – something is blocking caching

This topic has 3 replies, 2 voices, and was last updated 1 day, 20 hours ago ago by Jack Richardson

  • Avatar: Pit
    Pit
    Participant
    March 13, 2026 at 10:55

    Hello, I’m having trouble caching the site. Our tests indicate it’s caused by xstore. Can you help me? I am sending a copy from the console in the attachment.
    Regards

    Content is visible for topic creator and
    support staff only.
    2 Answers
    Avatar: Pit
    Pit
    Participant
    March 13, 2026 at 11:21

    The problem:
    Every product page returns nestify-cdn-cache: BYPASS because the server receives cache-control: no-store and Set-Cookie: woocommerce_recently_viewed in the response — even for guest users with an empty cart.

    This means the CDN cannot cache any product pages, which seriously impacts performance.

    Root cause identified:
    The woocommerce_recently_viewed cookie triggers a WooCommerce session start (WC_Session_Handler), which automatically calls wc_nocache_headers() and forces no-store on every product page.

    What I’ve tried:

    remove_action(‘template_redirect’, ‘wc_track_product_view’, 20) — cookie still appears, suggesting XStore sets it via its own function in et-core-plugin

    add_filter(‘woocommerce_should_start_session’, ‘__return_false’) — no effect

    All mu-plugins PHP snippets — no-store header persists

    My question:

    Does XStore have a built-in option to disable Recently Viewed Products tracking (the cookie, not just the widget)?

    Which exact function/hook in et-core-plugin sets the woocommerce_recently_viewed cookie so I can remove it via remove_action?

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    March 13, 2026 at 14:07

    Hello @Pit,

    We have the following hooks in our theme:
    add_action( 'template_redirect', 'et_wc_track_product_view', 20 );
    located in xstore/framework/woo.php

    You can temporarily uncomment this line completely and then check the result.

    Alternatively, you can use the following custom PHP snippet in your child-theme/functions.php file:

    add_action('wp', function() {  
        remove_action( 'template_redirect', 'et_wc_track_product_view', 20 );  
    }, 70);

    For more details, please visit: https://www.8theme.com/topic/caching-issue-due-to-recently-viewed-products/#post-355138

    Best regards,
    Jack Richardson
    The 8Theme’s Team

  • Viewing 3 results - 1 through 3 (of 3 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.