Edge Cache TTL in a page rule does not work for me

I thought I understood Edge Cache TTL but I cannot get it working well and I hope someone can help me out.

I have a page rule to ‘Cache Everything’ for the html like this:
www.example.com/ * .html (without the spaces)
Cache Level : Cache Everything
Edge Cache TTL : 30 min

And I am getting ‘HIT’ on the page headers.

After 3 days I am still seeing the old content (forcing browser refresh and different browsers)
If I add a query string such as ‘?a=b’ I get the fresh content.
If I flush the Cloudflare cache for a page it will update to the new content from the server
If I disable the rule I see the new content, turning the rule back on reverts to the old content.

The backstroy is I did have Edge Cache TTL set to one month in this rule.

It “feels” like the old Edge Cache TTL setting was saved in the cache along with the page data, so changing the Edge Cache TTL setting seems to have no effect on the currently stored pages.

Is that the way the way Cloudflare works, or am I doing something wrong with my settings?

Regards
Scott

Do you have a similar page rule, with a higher TTL? Are tany existing headers in your pages showing a higher TTL than your page rule does? If so, check if you have ‘respect existing headers’ activated in the caching section.

Thanks for the quick reply.
No I did check all rules carefully and no other rules apply. Turning off the rule retrieves the current content so i know this rule is the one Im working with.

I have “Browser Cache Expiration” set to 'Respect Existing Headers" ,

here are the relevant headers I receive with the rule ON:

cache-control: max-age=86400
cf-ray: 4735da2ddfa55203-MEL
cf-cache-status: HIT
content-encoding: br
content-type: text/html; charset=UTF-8
expect-ct: max-age=604800, report-uri=“https://report-uri.Cloudflare.com/cdn-cgi/beacon/expect-ct
pragma: cache
server: Cloudflare
status: 200

These are the headers with the rule OFF:

cache-control: max-age=86400
cf-ray: 4735dc54ae185203-MEL
content-encoding: br
content-type: text/html; charset=UTF-8
expect-ct: max-age=604800, report-uri=“https://report-uri.Cloudflare.com/cdn-cgi/beacon/expect-ct
pragma: cache
server: Cloudflare
status: 200

The only difference is the cf-cache-status is no longer sent which sounds right.

It looks like no one can help here, even Cloudflare IT?

I have to assume my theory is correct:

Pages seem to be sent to a server along with the expiry date calculated from the Edge Cache TTL rule.

Changes to the rule will not propagate out to update the expiry.

In my case, I have pages stored in the servers which are 3 weeks old even though I have now set that to rule one day Edge Cache TTL.

I am guessing that after 1 month all pages will be one day old regardless of the server.

It would be nice if a change to the Edge Cache TTL rule would propagate out, or at least just flush the data in servers which now have the incorrect expiry date.

This topic was automatically closed after 30 days. New replies are no longer allowed.