Skip to main content

Module cache

Module cache 

Source
Expand description

Caching layer for VelesDB (SOTA 2026).

Based on arXiv:2310.11703v2 recommendations:

  • LRU cache for metadata-only collections
  • Bloom filter for existence checks
  • Cache statistics and monitoring

§Thread-Safety & Lock Ordering

All structures are thread-safe via parking_lot::RwLock.

Lock Hierarchy (acquire in this order to prevent deadlocks):

  1. BloomFilter.bits (RwLock)
  2. BloomFilter.count (RwLock)
  3. LruCache.inner (RwLock)

Re-exports§

pub use plan_cache::CompiledPlan;
pub use plan_cache::CompiledPlanCache;
pub use plan_cache::PlanCacheMetrics;
pub use plan_cache::PlanKey;

Modules§

plan_cache
Compiled query plan cache types for VelesDB (CACHE-01).

Structs§

BloomFilter
Bloom filter for probabilistic existence checks.
CacheStats
Cache statistics for monitoring.
LockFreeCacheStats
Statistics for the two-tier cache.
LockFreeLruCache
Lock-free two-tier cache with DashMap L1 and LruCache L2.
LruCache
Thread-safe LRU cache with O(1) operations.