Skip to main content

record_request

Function record_request 

Source
pub fn record_request(messages: &[Value], cached: usize) -> Option<CacheOutcome>
Expand description

Attribute this request’s cache outcome and record it, updating the conversation’s last-seen prefix baseline for the next turn. Only anchored turns (cached > 0) are attributable; an unanchored turn returns None (the cache-aligner telemetry #940 covers “client never anchors”). The caller owns the opt-in gate — this only runs when proxy.cache_policy is enabled.