Repository navigation
[docs] Update aspire cache clear docs with staging NuGet package cache - #1108
aspire-repo-bot[bot] wants to merge 1 commit into
Conversation
aspire cache clear now also removes staging channel NuGet package caches stored under <ASPIRE_HOME>/.nugetpackages/. These per-build caches are keyed by the staging feed URL hash and can become wedged, causing assembly loading failures. Running aspire cache clear is now the supported recovery path. Documents changes from microsoft/aspire#17573. Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR updates the aspire cache clear CLI reference documentation to include staging-channel NuGet package caches as part of the data cleared by the command.
Changes:
- Mentions staging NuGet package caches in the command description.
- Adds staging package caches to the “What gets cleared” list.
- Adds a “When to clear cache” section with staging restore guidance.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Downloaded project templates | ||
| - NuGet package metadata and search results | ||
| - Integration package information | ||
| - Staging NuGet package caches (per-build caches under `<ASPIRE_HOME>/.nugetpackages/`) |
David Pine (IEvangelist)
left a comment
There was a problem hiding this comment.
Docs accuracy review
Source of truth: microsoft/aspire@cc4b7eaf (release/13.4, fetched 2026-05-29)
PR head: 8845906ebba760deff69b3dcccc2c826d19554d9
| Verdict | Count |
|---|---|
| verified | 3 |
| verified-with-nuance | 1 |
| unverifiable | 0 |
| contradicted | 0 |
Verdict: COMMENT. Cache location and the wedged-staging-restore remediation are exact. One small framing nuance: the per-staging-build subdirectories are actually keyed by feed-URL hash, not by build id; in practice each staging build has its own feed URL so the user-visible behavior is equivalent.
Doc-tester (UX) notes
A user hitting a wedged staging restore will find this page and get the right remedy — aspire cache clear removes everything under <ASPIRE_HOME>/.nugetpackages/, which is exactly what the source comment is built to fix. The "When to clear cache" bullet that mentions the wedged-staging case is a useful entry point.
Verified claims (with evidence)
| # | Claim | Evidence |
|---|---|---|
| 1 | "aspire cache clear ... includes ... staging NuGet package caches." |
src/Aspire.Cli/Commands/CacheCommand.cs:43-50 — the ClearCommand execution deletes the parent of GetStagingNuGetPackagesDirectory(...) ( _.../.nugetpackages/) so all SHA-keyed subdirectories are wiped. Comment block (:43-48) calls out the staging-specific intent and the <ASPIRE_HOME>/.nugetpackages/ path. |
| 2 | "<ASPIRE_HOME>/.nugetpackages/" |
src/Aspire.Cli/Utils/CliPathHelper.cs:26 internal const string StagingNuGetPackagesFolderName = ".nugetpackages"; and :70-74 GetStagingNuGetPackagesDirectory returns Path.Combine(aspireHomeDirectory.FullName, StagingNuGetPackagesFolderName). |
| 3 | "can recover from a wedged staging restore without manual filesystem intervention." | CacheCommand.cs:43-48 comment reads: "clearing them lets users recover wedged staging restores without filesystem surgery." Same intent, slightly different phrasing. |
Verified-with-nuance
| # | Claim | Nuance |
|---|---|---|
| 4 | "per-build NuGet package cache" / "per-build caches under <ASPIRE_HOME>/.nugetpackages/" |
CliPathHelper.cs:76-108 ComputeStagingFeedCacheKey keys on the feed URL (XxHash3, lower-cased, trimmed), not on the build id directly: "Keying on the feed URL (rather than the CLI commit SHA) means that the same CLI talking to two different override staging feeds gets two distinct caches." Each staging build does in practice expose a unique feed URL, so the user-visible "one cache per build" framing holds, but the literal implementation is "one cache per feed URL hash". Worth noting in case a reader is hunting for <sha> style directory names by build id rather than feed hash. |
|
Does not need to be documented. |
Documents changes from microsoft/aspire#17573
Authored by
@danegsta.Targeting
release/13.4based on the source PR milestone13.4(exact match).Why this PR is needed
The
aspire cache clearcommand was extended in microsoft/aspire#17573 to also wipe staging-channel NuGet package caches stored under<ASPIRE_HOME>/.nugetpackages/. These per-build caches (keyed by a short hash of the staging feed URL) can become stale and cause assembly-loading failures in polyglot AppHosts using a stable-shaped staging CLI build. Runningaspire cache clearis now the supported recovery path — no manual filesystem surgery required.The existing docs described what the command clears but did not mention the staging NuGet package caches. This PR fills that gap.
Changes
aspire-cache-clear.mdx:<ASPIRE_HOME>/.nugetpackages/Files modified
src/frontend/src/content/docs/reference/cli/commands/aspire-cache-clear.mdx(updated)