Expand description
shared object range cache
Modules§
- backend
- blocks
- bounded_
memory_ backend - circuit_
breaker - A small, domain-agnostic circuit breaker: closed/open/probing state driven
by consecutive-failure counting and a fixed cooldown. Deliberately free of
any cache-specific naming so it stays reusable (and so
imetric!’s literal-name requirement doesn’t leak into it) — state transitions are returned to the caller, which owns the metrics and logs. - client
- foyer_
backend - l1_
store - memory_
backend - metric_
tags - Bounded,
'static-safe tag construction for the object cache’s dimensioned metrics (prefix,class). - prefetch
- range_
cache - validation
Structs§
- Bounded
Memory Backend - A byte-weighted, sharded, in-memory
RangeCacheBackendbounded to a fixed capacity, built on the standalonefoyer-memorycrate’sCache– not the umbrellafoyercrate (whichFoyerBackenduses viaHybridCache, and which transitively pulls in a disk-backed storage engine).foyer-memoryis the same in-memory engineHybridCacheuses internally for its RAM tier, so this reuses that eviction implementation without the disk-IO dependencies, viaLfuConfigrather thanFoyerBackend’sLruConfig. - Cache
Client Config - Tunables for
CacheClientStore.Defaultcarries the production values,from_envapplies operator overrides, and tests construct one directly (short timeouts, near-zero or very long cooldown) instead of sleeping. - Cache
Client Store - Circuit
Breaker - Gates access to a flaky resource: trips after
failure_thresholdconsecutive unresponsive reports, stays open for a fixedcooldown, then admits exactly one probe request to test recovery. - Circuit
Breaker Config - Tunables for a
CircuitBreaker. - L1Cache
Store - An
ObjectStoreadapter frontingoriginwith a RAM-backedRangeCache. - Prefix
Prefetch - Prepends a root prefix to each
PrefetchItem’s key before delegating, so a warm keyed by a lake-root-relative path (views/…) targets the same cache key a demand read produces throughobject_store::PrefixStore(root/views/…). This mirrors, for the prefetch path, whatPrefixStoredoes for reads.
Enums§
- Ranges
Read Error - Why reading a streamed
/rangesresponse body failed. Public API surface (re-exported fromlib.rs) so the cross-crate integration test can assert on the exact failure kind directly (viasend_ranges), rather than inspecting logs or metrics. - Ranges
Send Error - Why
send_rangesfailed, keeping the header-phase failure, a non-2xx status, and eachRangesReadErrorbody-failure kind distinct rather than folding them into one. Public API surface (re-exported fromlib.rs) for the same reason asRangesReadError.
Functions§
- l1_wrap
- Wrap
originwith the in-process L1 cache: aRangeCacheover the shared bounded RAM backend, namespaced byns(e.g."lakehouse","static") so distinct wrap sites share one RAM budget without their keys colliding.