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