
Design a Cache Index API with Explicit Freshness and Invalidation
A useful cache API needs more than get and set. Define identity, freshness, generations, and failure behavior so clients know when a response is safe to reuse.
Read the articleSubject collection / 3 articles
Explore the invalidation questions that connect these guides.
Invalidation connects a change in the world with a decision to stop reusing old work. It can follow a source update, a policy revision, or an access change. This collection focuses on making that relationship explicit rather than treating expiration as a universal solution.
Trace one changed dependency through your system. Which entries become unsuitable, what does a caller see, and where does the replacement come from? A useful invalidation design explains all three. Read the API and agent examples together to see why different reuse layers may need different boundaries.

A useful cache API needs more than get and set. Define identity, freshness, generations, and failure behavior so clients know when a response is safe to reuse.
Read the article
A remembered preference, an active task, and a reusable answer need different rules for identity, updates, retention, and evaluation.
Read the article
A cache index helps a system decide which stored result belongs to a request—and whether reusing it is still appropriate.
Read the articleStart with the Cache Index API guide to place the terminology in context. Then explore Agents Cache Index for a connected design question.
A topic can cross several systems. Browse the complete Lab for the surrounding articles, or use the 22-topic directory to find a different entry point.