What is a cache, and what does TTL mean?
Answer out loud or in your head first, then compare.
Answer
A cache stores a result so it doesn't have to be calculated or fetched again every time. TTL sets how long an entry may be treated as valid in a given mechanism. That speeds up reads, but it means the risk of using an older version.
For example, a list of categories rarely changes, so you can use a stored result for a while. Access to an HR document can change suddenly, so caching it needs different rules. The important questions are: where do we rebuild the data from, when do we remove the copy, and does the result depend on the user? A longer TTL isn't always the better decision.
Why it matters: The foundation for questions about KV, Redis, CDN and RAG.
Possible follow-ups: What happens when many users hit a missing cache entry at the same time?
How did it go? Be honest — “Not yet” puts the question on your review list.
Further reading
- Cloudflare: How KV works(opens in a new tab)Docs; accessed 22.10.2026. Eventual consistency, including caching of missing keys; no atomic KV transactions.
- Cloudflare: What is a CDN?(opens in a new tab)Accessed 22.10.2026. Cached copies of content, the delivery network and the role of the origin server.