Expand description
Generic per-path, mtime-gated file cache shared by every ecosystem config-file cache
(deps-cargo’s .cargo/config.toml/$CARGO_HOME/config.toml, deps-npm’s .npmrc).
MtimeFileCache<T> caches raw, unvalidated parse results, keyed by file path and
invalidated by mtime — validation, environment-variable expansion, and policy gating are
expected to run per call against the cached raw value, never cached themselves, so a
didChangeConfiguration policy change or an environment-variable change takes effect
immediately with no cache invalidation of its own. That split is the caller’s
responsibility: this cache only knows how to keep one path’s T fresh.
Structs§
- Mtime
File Cache - Per-path memoization of a file’s parsed contents, invalidated by mtime.
Constants§
- DEFAULT_
MAX_ CACHED_ FILES - Upper bound on a
MtimeFileCache’s entry count. - MAX_
CACHED_ FILE_ BYTES - Maximum file size
MtimeFileCache::get_or_parsereads before parsing.