I am having an issue with Caheing pages on the first request even after it is set to Cache Everything and Origin Cache-Control: On
It shows BYPASS for some bots like Google, bing, semrush etc… But when I visit the page it shows MISS and cache on my first request and thereafter it shows HIT.
When I set Edge Cache TTL on Page Rule only it works and shows MISS on the first request by all bots and me.
Is there any workaround for this?
The first one shows your server setting a cookie. Cloudflare will BYPASS cookie’d resources since they’re user-specific.
Is there a way to force cache even if the cookie is set not by using Edge Cache TTL on Page Rule?
It sounds like without setting Edge Cache, it won’t cache the cookie.
You might try experimenting with the CDN-Cache-Control headers, but I’ve never tried that.
header(‘Cache-Control: public, max-age=86400, must-revalidate’);
I have tried this. But still, it shows BYPASS.
Edited: Anyway I removed the cookies from origin for now.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.