A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Cloudflare Edge Caching with Anonymous ID Middleware

Vote:
 

Our site uses CMS 12 and Commerce 14, and we have the AnonymousIdMiddleware in place. This sets a cookie `EPiServer_Commerce_AnonymousId` in order to allow logged out users to access their carts, etc.

The knock-on effect of this is that Cloudflare cannot fully cache pages due to there being a `Set-Cookie` header present. We have a large number of pages where the content is static and could be offloaded to the CDN, but as it stands we're limited to caching media and static assets due to this.

Has anyone managed to get `Cf-Cache-Status: HIT` on a Commerce site page, or is this a non-starter?

Any insights or workarounds anyone has used would be much appreciated!

#341228
Dec 05, 2025 11:11
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.