Retention policy determining when response is cleaned up
Optional ttlTime-to-live in milliseconds (required for TTL retention)
Optional extendFor TTL retention: extend TTL instead of replacing data on new request
When false (default): New request clears old data and stores new data with fresh TTL When true: If cached data exists and hasn't expired, extend TTL without replacing data
Use extendOnRefresh=true to avoid re-running expensive operations when cached data is still valid.
false
// Replace on each request (default)
cache: { retention: ResponseRetention.TTL, ttl: 5 * 60 * 1000 }
// Extend TTL on refresh - avoid re-fetching if cache valid
cache: { retention: ResponseRetention.TTL, ttl: 5 * 60 * 1000, extendOnRefresh: true }
Optional maxMaximum number of responses to cache per path (future use)
Configuration for response caching behavior