Summary
Keep findings fresh when references change in other files and cache valid results for unchanged documents.
Motivation
The provider currently refreshes itself for configuration changes, while the reference graph can also change when another supported file is saved, created, deleted, or renamed. Repeated requests for the same document version also redo every reference lookup.
Scope
- Cache the latest result per document URI using document version, analysis-graph epoch, and relevant configuration as the cache identity.
- Increment the graph epoch when a supported document is saved or a supported file is created, deleted, or renamed.
- Fire a CodeLens/inlay/diagnostic refresh after the graph epoch changes.
- Add
Zero Reference: Refresh to invalidate all cached analysis explicitly.
- Release per-document cache entries when documents close and clear all state on provider disposal.
- Do not trigger a global reanalysis for every unsaved keystroke in another document.
Acceptance criteria
- Repeating analysis for the same document version and graph epoch performs no new symbol or reference provider calls.
- Editing the analyzed document invalidates its cache entry.
- Saving, creating, deleting, or renaming another supported file invalidates affected results and refreshes visible findings.
- Configuration changes invalidate results whose eligibility or display can change.
- In-flight work from an older document version or graph epoch never becomes visible.
- Cache size remains bounded by active/recent documents and is covered by lifecycle tests.
Summary
Keep findings fresh when references change in other files and cache valid results for unchanged documents.
Motivation
The provider currently refreshes itself for configuration changes, while the reference graph can also change when another supported file is saved, created, deleted, or renamed. Repeated requests for the same document version also redo every reference lookup.
Scope
Zero Reference: Refreshto invalidate all cached analysis explicitly.Acceptance criteria