Skip to main content

Module cache

Module cache 

Source
Expand description

Three-layer cache system for MUR Commander.

  • L1: Struct cache — pre-loaded workflows, patterns, config, constitution
  • L2: Query cache — search results and injection results
  • L3: LLM response cache — prompt→response pairs to save API costs

Structs§

CacheEntry
Cache entry with TTL tracking.
CacheStats
Cache statistics.
CacheSystem
Combined three-layer cache.
L1StructCache
L1: Struct cache for frequently accessed data.
L2QueryCache
L2: Query result cache.
L3LlmCache
L3: LLM response cache — exact prompt→response to avoid duplicate API calls.
LlmCacheEntry
Cached LLM response.

Functions§

prompt_hash
Compute a simple hash of a prompt for L3 cache keys.