Hello,
I am currently trying to optimize my website’s performance using RunCloud’s RunCache plugin coupled with Cloudflare Full Page Edge Caching. However, I am facing an issue where the entire website (homepage, shop, categories, standard pages) refuses to be cached for anonymous visitors.
When inspecting the network headers in an incognito window on any page, I get the following:
cf-cache-status: DYNAMIC
x-runcache-status: BYPASS
cache-control: private, no-store, no-cache, must-revalidate
After troubleshooting, we discovered that this bypass is triggered because a WooCommerce session (specifically the wp_woocommerce_session_… cookie) is being initialized immediately upon the first visit to any page, even for anonymous visitors with an completely empty cart.
We have already done the following:
Enabled “Enable AJAX add to cart buttons on archives” in WooCommerce settings.
Verified that our caching rules are only bypassing the /cart, /checkout, and /my-account endpoints.
Disabled the DONOTCACHEPAGE constant listener in our cache rules to prevent false positives.
It seems that a global feature within the XStore theme (perhaps the mini-cart in the header builder, the wishlist, or “recently viewed products” widget) is forcing the WooCommerce session to start on every single page load, which completely breaks our edge caching setup.
My questions are:
What specific XStore theme settings do I need to adjust to prevent the WooCommerce session from starting prematurely on regular pages for visitors with an empty cart?
Are there any known workarounds or best practices with XStore to make it fully compatible with Cloudflare Edge Caching / Full Page Cache?
Thank you in advance for your help!