Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions NuGet/NuGetFeedClass.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,16 @@ class NuGetFeed {
Write-Host -ForegroundColor Green "NuGet package successfully submitted"

# Clear matching search results caches
@( $this.searchResultsCache.Keys ) |
Where-Object { $package -like "*$($_)*" -or $_ -like 'GitHubPackages:*' } |
# Extract package ID from filename: format is {packageId}-{version}.nupkg
$packageFileName = [System.IO.Path]::GetFileNameWithoutExtension($package)
# Version pattern: -X.Y.Z.W or -X.Y.Z at the end, optionally followed by prerelease tag like -beta
if ($packageFileName -match '^(.+)-(\d+\.\d+\.\d+(\.\d+)?(-[a-zA-Z0-9]+)?)$') {
$packageId = $matches[1]

@( $this.searchResultsCache.Keys ) |
Where-Object { $packageId -like "*$($_)*" -or $_ -like 'GitHubPackages:*' } |
ForEach-Object { $this.searchResultsCache.Remove($_) }
}
}
catch [System.Net.WebException] {
if ($_.Exception.Status -eq "ProtocolError" -and $_.Exception.Response -is [System.Net.HttpWebResponse]) {
Expand Down
1 change: 1 addition & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
6.1.15
Fix bug where NuGet cache was not cleared for runtime package feeds

6.1.14
Fix System.IO.Pipelines assembly load failure in PS7 WinRM sessions on containers with .NET 10
Expand Down