Skip to main content

Module range_cache

Module range_cache 

Source

Structs§

RangeCache
Range-aware read cache over an origin object store.

Enums§

RangeError
Errors returned by [RangeCache] that callers may want to handle distinctly.
StreamRangesCaller
Which caller is invoking RangeCache::stream_ranges, selecting which of the two distinct range_cache_get_range_error / range_cache_get_ranges_error counters is emitted on an upfront validation failure or a mid-stream fetch error. stream_ranges is the single fill path behind both get_range/ get_range_handler (Range) and get_ranges/post_ranges_handler (Ranges), so the tag keeps the two metric names emitting exactly as they did before those call sites shared one implementation.

Constants§

DEFAULT_BLOCK_SIZE
DEFAULT_DEMAND_RESERVED_FETCH_PERMITS
Default number of DEFAULT_TOTAL_FETCH_PERMITS slots reserved for demand reads (never consumed by prefetch).
DEFAULT_MAX_COALESCED_GET_BYTES
Default max byte span of one coalesced run GET.
DEFAULT_PROMOTE_WHOLE_BATCH
Default promotion granularity: promote only the run(s) covering a demanded block, not the whole prefetch batch.
DEFAULT_TOTAL_FETCH_PERMITS
Default total number of origin GETs allowed to run concurrently. See RangeCache::new.
DEMAND_WINDOW_BLOCKS
Number of blocks per streamed fetch window used by stream_ranges. At the default 1 MiB block size, 8 blocks (8 MiB) matches one coalesced origin GET run (DEFAULT_MAX_COALESCED_GET_BYTES), with buffered(2) giving modest pipeline overlap. This bounds peak in-flight memory per stream to roughly 2 * DEMAND_WINDOW_BLOCKS * block_size, independent of how large the requested range is.