Edge Cache 1 hour -- how does it behave?

We would like to know more specifically how Edge Cache TTL 1 hour actually works.

Please be particularly aware that Cloudflare maintains over 200 Edge Servers and we are using Argo Tiered Caching + Smart Routing with the new Smart Tiered Cache Topology. Would you please if you know for sure?

Does it behave like “a” or “b” or “c” or some completely different way?

a) an item in the Edge Cache will be served in response to all requests for an hour. After being in the EdgeCache for 1 hour it will expire from all Edge Servers and the next request will be fulfilled by requesting the item from our Origin server.

b) an item in the Edge Cache will be served in response to all requests for at least one hour. The item will not expire until an hour has passed by during which no requests for the item have been made. At that point the item will expire and the next request will be fulfilled by requesting the item from our Origin server.

c) an item in an individual Edge Cache will be served in response to all requests for an hour, beginning from the instant that the particular Edge Server first received a request for the item and cached it from our Origin server. After being in the particular Edge Server Cache for 1 hour it will expire from this particular Edge Server and the next request will be fulfilled by requesting the item from the higher Tiered Edge Server. Some Edge Servers may continue to respond with their copy of the item which may have been cached in that Edge Server at a later time. Hence, different Edge Servers may respond with different versions of the item since each Edge Server maintains its own expiration time for the item based on when that Edge server cached the item. Worst case, it may be 2 hours before all Edge Servers are returning an updated copy of the cached item if that item changes after one hour plus 1 second.

In all cases, consider that no Cache Purge is performed.

Thank you!

At Cloudflare dashboard, Edge Cache TTL has a range of edge cache TTLs differend by the plan type:

  • Free 2 hours
  • Pro 1 hour
  • Business 30 minutes
  • Enterprise as low as 30 seconds

The Cache-Control max-age is a maximum age. It is not a guarantee that the asset will be retained for an hour. Tiered caches use the Age header to determine freshness. If the primary cache serves a request to an edge location with age of 59 mins 59 seconds, that edge will revalidate that asset one second later.

2 Likes