When does Edge Cache TTL expire time start?

Edge Cache TTL what happens to the cache when this time expires? Does Cloudflare purge that cache automatically when the time expires from all data centers?

If we cache a URL page using the Cache Everything page rule and set it to Edge Cache TTL 1 hour (Pro Plan) and there is 1 new visitor to that URL page every minute. When does the Edge Cache TTL that was set to 1 hour expire?

  • 1 hour after the first visitor or the last visitor?

  • What if there is at least 1 visitor every 30 minutes all day every day to that same URL when does the Edge Cache TTL expire? Never?

  • One datacenter has a visitor every 30 minutes and another datacenter only has 1 visitor a day. Does the Edge Cache TTL expire independently depending on their data center location?

1 hour after the first visitor visits your website.

Refer to the first answer. After someone visits for the first time, the upcoming visitors will hit the cache within the 1 hour duration. TTL will still expire after 1 hour. After 1 hour, new content from your server will be served to the next visitor.

Yes. each data centre will store its own copy of cache.


Since there were hits to the cache before the 1 hour expires will the next visit after the expired time get an cf-cache-status = HIT or Expired or Miss?

If Expired that means that the first visitor after the expired time will need to pull from the origin server first correct?

This is what I have set for our origin cache-control:

Header set Cache-Control “public, max-age=1800, stale-while-revalidate=30, stale-if-error=60, must-revalidate”

You can refer to this documentation:

Usually you won’t get MISS unless you specifically purge the cache. Otherwise, you may get EXPIRED, STALE, UPDATING or REVALIDATED, based on situations.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.