TTL.
also: time-to-live · time to live · TTLsTime-to-live: how long a cache entry (or record) is kept before it expires automatically.
the two-minute refresher
- Simplest invalidation: the entry expires after N seconds, whatever happens.
- Within the TTL, readers can see stale data even if the database changed.
- Short TTL = fresher data, more misses; long TTL = fewer misses, staler data.
- Use it as a safety net under event-driven invalidation, and add jitter so keys don't expire together.