Expand description
Response-cache backends for the proxy-cache node.
One trait, two implementations: a process-local map and (from the redis
backend onwards) a shared store. proxy-cache holds whichever it was
configured with and never learns which.
Structsยง
- Cache
Error - A backend could not answer. Distinct from a miss; see
ResponseCache. - Cached
Response - A cached upstream response, without any notion of when it expires.
- Local
Response Cache - Process-local cache. Shared by every
policy: localnode in the gateway.
Constantsยง
- DEFAULT_
MAX_ ๐ENTRIES - Entries the local cache keeps before it starts evicting.
- RECLAIM_
FRACTION ๐ - Fraction of capacity a sweep reclaims in one pass.
Traitsยง
- Response
Cache - Storage for
proxy-cache.
Functionsยง
- pair_
prefix ๐ - The key prefix shared by every entry a
proxy-cachepair writes.