Skip to main content

Module cache

Module cache 

Source
Expand description

In-memory block cache — L1/L2 hot cache above a backing BlockStore

§Overview

Two public cache abstractions are provided:

  • BlockCache — a standalone LRU cache (pure in-memory, no backing store).
  • CachedBlockStore<S> — a two-level cache that wraps any BlockStore (L2) with an in-process LRU cache (L1). Stats are tracked with lock-free atomics.

A tiered variant (TieredCachedBlockStore) is also available for workloads that benefit from separate hot/warm tiers.

Structs§

BlockCache
Standalone in-memory LRU cache for blocks.
CacheConfig
Configuration for CachedBlockStore.
CacheStats
Live, lock-free counters for a CachedBlockStore.
CacheStatsSnapshot
A serialisable, cloneable point-in-time view of CacheStats.
CachedBlockStore
A two-level cache that wraps any BlockStore (L2) with an in-process LRU cache (L1).
LegacyCacheStats
Plain-data statistics snapshot returned by BlockCache::stats.
TieredBlockCache
Multi-level in-process cache with hot (L1) and warm (L2) tiers.
TieredCacheStats
Statistics snapshot for TieredBlockCache.
TieredCachedBlockStore
A BlockStore wrapper that uses a TieredBlockCache (hot L1 + warm L2) in front of any backing store.