Module cache

Module cache 

Source
Expand description

Tiered caching infrastructure.

Reflex uses:

  • L1: exact-match lookup (in-memory)
  • L2: semantic search (vector DB)

Start at TieredCache and TieredLookupResult.

Re-exports§

pub use l1::L1Cache;
pub use l1::L1CacheHandle;
pub use l1::L1LookupResult;
pub use l2::BqSearchBackend;
pub use l2::DEFAULT_TOP_K_BQ;
pub use l2::DEFAULT_TOP_K_FINAL;
pub use l2::L2_COLLECTION_NAME;
pub use l2::L2_VECTOR_SIZE;
pub use l2::L2CacheError;
pub use l2::L2CacheResult;
pub use l2::L2Config;
pub use l2::L2LookupResult;
pub use l2::L2SemanticCache;
pub use l2::L2SemanticCacheHandle;
pub use l2::NvmeStorageLoader;
pub use l2::StorageLoader;
pub use l2::MockL2SemanticCache;mock
pub use l2::MockStorageLoader;mock
pub use tiered::MockTieredCache;mock
pub use tiered::TieredCache;
pub use tiered::TieredCacheHandle;
pub use tiered::TieredLookupResult;
pub use types::REFLEX_STATUS_ERROR;
pub use types::REFLEX_STATUS_HEADER;
pub use types::REFLEX_STATUS_HEALTHY;
pub use types::REFLEX_STATUS_NOT_READY;
pub use types::REFLEX_STATUS_READY;
pub use types::REFLEX_STATUS_STORED;
pub use types::ReflexStatus;

Modules§

l1
L1 exact-match cache. L1 exact-match cache (in-memory).
l2
L2 semantic cache. L2 semantic cache (embedding + vector search + rescoring).
tiered
L1+L2 tiered cache wrapper. Tiered cache: L1 exact + L2 semantic.
types
Status/header types shared across the cache pipeline.