Skip to main content

inspect_parse_cache

Function inspect_parse_cache 

Source
pub fn inspect_parse_cache(config: &ResolvedConfig) -> ParseCacheStatus
Expand description

Inspect the persisted extraction cache the way an analysis run would.

This reads the header and decodes the blob to learn its config hash, so the cost is that of a cache load and nothing more: no analysis, no writes, no network. config.no_cache is deliberately ignored, because the question is what state the cache is in, not whether this particular invocation would consult it.

The expected config hash is recomputed rather than read off config: ResolvedConfig::cache_config_hash is zero whenever caching is disabled, which is exactly how a caller that only inspects resolves its config, and comparing a real cache against that zero reported every healthy cache as config drift.