Performance
TTL
TTL (Time To Live) defines how long cached data stays valid before it automatically expires and must be refreshed.
Diagram
Cache entry created at 10:00 AM, TTL = 300s (5 min) 10:00 ── HIT ── HIT ── HIT ── 10:05 EXPIRED ── MISS ── re-fetch from DB
In Depth
TTL (Time To Live) is a duration set on cached items — in Redis, CDN edge nodes, or DNS records — after which the entry is automatically deleted or considered stale.
Related Terms