Module cache

Module cache 

Source
Expand description

Caching Module

Provides query result caching for improved performance.

§Architecture

┌─────────────────────────────────────────────────────────────┐
│                    QueryCache                                │
├─────────────────────────────────────────────────────────────┤
│  LRU eviction policy                                         │
│  TTL-based expiration                                        │
│  Thread-safe access                                          │
└─────────────────────────────────────────────────────────────┘

§Cache Key

Cache keys are computed from:

  • Query embedding (hashed)
  • k value
  • Filter expression (if any)
  • Index names (if specified)

Structs§

CacheConfig
Cache configuration.
CacheEntry
Cached entry with metadata.
CacheKey
Cache key for queries.
CacheStats
Cache statistics.
QueryCache
LRU query cache with TTL expiration.