CachingFilePathResolver Class

Definition

A decorator around IFilePathResolver that caches resolved absolute FileInfo paths, keyed on the raw target, delegating to the inner resolver (PATH-first per GLOSSARY DD1) on a cache miss.

public sealed class CachingFilePathResolver : IFilePathResolver

Remarks

Lives in CliInvoke.Extensions; CliInvoke.Core remains free of caching concerns (see DECISIONS-CliInvoke-middleware-truncation-caching-retry.md).

Cache keys are normalised per OS casing rules: case-insensitive on Windows, as-is elsewhere. Two lookups that differ only by case share one cache entry on Windows.

A benign concurrent-compute race exists: two threads resolving the same target simultaneously may both call the inner resolver and write to the cache. The result is idempotent and the extra work is harmless; no single-flight lock is used.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Constructors (1)

Methods (2)