Skip to main content

Module chunk_cache

Module chunk_cache 

Source
Expand description

Chunk cache with hash-based index and LRU eviction.

The ChunkCache avoids re-traversing B-trees on repeated reads of chunked datasets. On first access it scans the B-tree once and builds a HashMap<ChunkCoord, ChunkInfo> (the chunk index). Decompressed chunk data is cached with LRU eviction controlled by a byte-budget.

Structs§

AccessStats
Access pattern statistics tracked by the chunk cache.
CacheAlignedBuffer
A byte buffer whose data pointer is aligned to CACHE_LINE_SIZE.
ChunkCache
A per-dataset chunk cache with hash-based index and LRU eviction.

Constants§

CACHE_LINE_SIZE
DEFAULT_CACHE_BYTES
Default maximum bytes of decompressed chunk data to cache.
DEFAULT_MAX_SLOTS
Default maximum number of cached decompressed chunks.

Functions§

align_to_cache_line
Round size up to the next multiple of CACHE_LINE_SIZE.

Type Aliases§

ChunkCoord
Coordinate key for a chunk — the N-dimensional offset vector.