I’m trying to cache static html from my origin server. I have made a rule for www.mydomain.xxx/* ; set it to Cache Everything, Origin Cache Control is ON.
When i make a request, i see in the response header this: “cf-cache-status: BYPASS” despite the fact that my origin sets this as a header “cache-control: public, max-age=86400”. There is something obvious i’m missing so i’d appreciate any hints.
Oh i think i just figured out, it’s probably because of cookies… If the server sets cookies it does not get cached and you get BYPASS header value.
I tried to make two locations in nginx conf - one just serves the static html & second servers the same file, but adds a bogus cookie. The first is cached and i get HIT, the second gets BYPASS
Are you using a Business or Enterprise plan? That sounds like Bypass on Cookies. I can’t readily find documentation on this, but I know it exists on the upper plans.
No i’m not sadly, that’s the $200 dollar feature. Yeah i have read that, but i think that gives you option to cache or not cache when there is or is not a cookie present.
I thought that Cache Everything meant Cache Everything (regardless of cookies), apparently Cache Everything means Cache unless there is a cookie.
it’s a wordpress site and i’m trying to accelerate the first page load (for instance when a user clicks on a banner).
The cookies are actually quite relevant for the target audience because they store things like currency or language (which are derived from a query param included in the banner link).
I think i can try to strip them and add them later, or just come up with something different.