Skip to main content

invalidate_cached

Function invalidate_cached 

Source
pub fn invalidate_cached(path: &Path, root: &Path, cache_dir: &Path) -> bool
Expand description

Invalidate the cache entry for a specific file.

Since caching is content-hash based, changing the file already causes a cache miss on the next read. This function pre-deletes entries matching the current content hash so stale data is cleaned up eagerly. It is a no-op when the file can’t be read (already deleted, etc.).