Mountain/Cache/PathCanon.rs
1#![allow(non_snake_case)]
2
3//! Process-wide canonical-path cache.
4//!
5//! Keyed by lexical input path; value is the result of `dunce::canonicalize`.
6//! Hits skip the syscall; misses run it and cache the result.
7//!
8//! The fs-scope security gate (`Environment::Utility::PathSecurity`)
9//! canonicalises every incoming path on every call. The same paths recur
10//! thousands of times during boot - 113 extension manifest paths, ~80 chunked
11//! workbench JS imports, ~60 git-extension scope checks, every
12//! `vscode-file://` request - so collapsing repeats to a hash lookup saves
13//! ~150 ms cumulative on the boot path.
14//!
15//! TTL = 60 s to bound staleness against external `mv`/rename. moka's
16//! `time_to_idle` resets on each access, so hot paths stay cached
17//! indefinitely while one-shot paths evict naturally.
18
19pub mod CacheStats;
20pub mod Canonicalize;
21pub mod CanonicalizeUncached;
22pub mod Clear;
23pub mod Invalidate;
24pub mod SpawnDiagnosticLogger;
25pub mod Stats;
26
27pub(crate) mod Cache;