Claude Certified Architect – Foundations Practice Question 79: Cache TTL One Hour
Claude Certified Architect, Foundations · Test 8 · question 9 of 10
A support assistant sends a 20,000-token system prompt and tool definitions with every request, cached with a breakpoint. Customers typically reply 10 to 20 minutes after each answer, so with default settings nearly every request misses the cache and pays the full write price. The team wants most follow-ups to hit the cache without running background keep-alive traffic. What should they do?
Show answer and explanation
Answer:
The default cache lifetime is 5 minutes, refreshed at no cost each time the entry is used. For traffic gaps longer than 5 minutes but shorter than an hour, the 1-hour option (cache_control with ttl "1h") fits. It costs more to write (2x base input price versus 1.25x for 5 minutes), while cache reads stay at the discounted rate, so it pays off when it turns repeated misses into hits.
- A is wrong: only two durations exist, the 5-minute default and 1 hour; "15m" is not a valid ttl value. - C is wrong: a shorter cached prefix does not extend how long it lives, and it caches less of the repeated content. - D is wrong: batch processing is for asynchronous bulk jobs, not interactive chat, and it is not a way to lengthen a cache lifetime.
Reference: Prompt caching