CHAPTER 09 · Data Modeling for Agents · 9 / 11
Caching external calls
Agents lean on external APIs that are slow, rate-limited, or costly. A simple cache table, keyed by a deterministic request key, storing the response payload and an expiry, turns repeated identical calls into instant lookups and shields you from upstream limits. Index the expiry for cleanup. This is data modeling in service of reliability and cost (Chapters 13, 14).