Expand description
Short-lived caches in front of a directory or an authorizer, to absorb bursts.
Cached wraps a provider and answers a repeated [Lookup] or authorization from memory
for CacheOptions::ttl, or negative_ttl for an answer
of “no such person” or “denied”. A credential is never cached: Cached does not
implement Authenticator. An error is never cached either.
Needs the cache feature.
Structs§
- Cache
Options - How long answers are kept, and how many.
- Cached
- A provider with its lookups and decisions kept for a short while.
Enums§
- Cache
Setting - A cache as configuration:
true(the defaults),false(off), orCacheOptions.
Constants§
- DEFAULT_
MAX_ ENTRIES CacheOptions::max_entriesby default.- DEFAULT_
NEGATIVE_ TTL CacheOptions::negative_ttlby default: 1 s.- DEFAULT_
TTL CacheOptions::ttlby default: 5 s.
Traits§
- Cache
Options Setters - The typed setters of
CacheOptions, for any builder that holds its settings.