mod cache_diagnostics#

module cache_diagnostics#

Runtime-local cache miss request facts and diagnostics tracking.

Functions

fn build_cache_request_facts(agent_id: &str, provider: &str, annotated_request: &AnnotatedLlmRequest, hot_cache: &Arc<RwLock<HotCache>>, tracker: &Arc<RwLock<CacheDiagnosticsTracker>>) -> Option<CacheRequestFacts>#

Builds canonical request facts for cache miss diagnosis from the live runtime state.

Structs and Unions

struct CacheDiagnosticsTracker#

Runtime-local miss diagnosis tracker.

last_seen_by_prefix: HashMap<StablePrefixKey, DateTime<Utc>>#

Last time a specific stable prefix hash was observed for an agent/provider pair.

last_exemplar_by_agent: HashMap<AgentProviderKey, StablePrefixExemplar>#

Last retained stable prefix exemplar for an agent/provider pair.