PRODUCTION SCENARIO
An internal knowledge base attaches a cache breakpoint to a 30,000-token company handbook. Queries arrive roughly every two minutes through an eight-hour shift.
How does the cache entry behave under this query pattern?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: Each hit refreshes the five-minute lifetime, so the handbook stays cached
The cache has a 5-minute lifetime and is refreshed each time the cached content is used, so a query every two minutes keeps the handbook warm across the whole shift. The lifetime is not a fixed window from the first write. The refresh costs nothing extra rather than re-billing a cache write. And the clock runs from the start of the request that reads or writes the entry, not from the end of the response, which is why a slow response eats into the window rather than resetting it afterwards.