Hi Cloudflare experts, I need some help understanding this Cloudflare behavior.
I wish to cache some pages in our website so I setup a rule in Cloudflare that says
- Cache-level = cache everything
- Origin cache control [checked]
On the origin site, I have 2 versions of the page
- exampledotcom/page/?nocache=1 → I append nocache=1 when user is logged in to wordpress. Then cache-control is set to
Cache-Control: no-cache, must-revalidate, max-age=0
- exampledotcom/page/ → This is the version I wish to cache in Cloudflare. Cache-control is set to public, max-age=86400
On the second case, the Cloudflare cache is working fine, I get HIT.
On the first case though, I only get EXPIRED (first visit) then REVALIDATED on the next visits. I am getting the Cloudflare cached page regardless of my changes to the page in origin.
Is there a way to exclude the first URL from caching through some rule sets or configuration in origin even though Cache-level is set to cache everything?