Skip to main content

Module cache

Module cache 

Source
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ยง

CacheError
A backend could not answer. Distinct from a miss; see ResponseCache.
CachedResponse
A cached upstream response, without any notion of when it expires.
LocalResponseCache
Process-local cache. Shared by every policy: local node 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ยง

ResponseCache
Storage for proxy-cache.

Functionsยง

pair_prefix ๐Ÿ”’
The key prefix shared by every entry a proxy-cache pair writes.