TTL

Time-to-live — how long a cached or transient value remains valid before being evicted or re-fetched.

Definition

Time-To-Live is the lifespan of a cached entry. DNS records have a TTL after which resolvers must re-query the authority. Redis keys can be set with TTL for auto-expiry. CDN caches use TTL to decide when to revalidate against the origin. Anthropic's prompt-cache also has a TTL — 5 minutes by default.

When to use

See also