TTL and Cache Revalidation

An asset's TTLTime to Live. Refers to the amount of time that a cached asset is still considered fresh. Our edge servers will continue to serve a cached version of an asset while its TTL has not expired. An asset's TTL is calculated by the Cache-Control and Expires headers associated with the response sent by the origin server. determines how long it will be available for immediate delivery to your clients. Once the TTL has expired, our edge servers will perform cache revalidationRefers to the process that occurs when a request for stale content requires that our edge servers check for a new version of the requested content on the origin server. to determine the action that will take place.

Revalidation Result Action

Same Version

The origin server indicated that the edge server contains the latest version of the requested content.

The edge server will:

  • Update the asset's TTL according to the response headers provided by the origin server. If these headers have not been defined, then the asset will be assigned a default TTL of 7 days from the time it was successfully revalidated.
  • Continue to serve the cached version of the asset.

Invalid Revalidation Request

A revalidation request was not possible because the cached asset did not have one of the following headers:

  • Last-Modified
  • Etag

The edge server will:

  • Purge the cached version of the asset.
  • Deliver the version provided by the origin server.

New Version

The origin server indicated that a new version of the requested content is now available.

The edge server will:

  • Purge the cached version of the asset.
  • Deliver a new version provided by the origin server.

Not Found

The origin server indicated that the requested content was not found.

The edge server will:

  • Purge the cached version of the asset.
  • Return a 404 Not Found to the user.
More Information