Skip to main content

Module cache

Module cache 

Source
Expand description

Cache for LLM answers to avoid redundant API calls Uses Blake3 hash of (query + context) as the key

Structs§

AnswerCache
In-memory LRU cache for answers Thread-safe with a simple mutex
CacheEntry
Cached answer entry
CacheStats
GLOBAL_CACHE

Functions§

check_cache
Check cache and return cached result if available
clear_global_cache
Clear the global cache
global_stats
Get global cache statistics
store_in_cache
Store result in cache