Skip to content

Commit a21d576

Browse files
Merge pull request #730 from PowershellFrameworkCollective/development
1.14.441
2 parents 6b64876 + 98c283d commit a21d576

7 files changed

Lines changed: 23 additions & 4 deletions

File tree

PSFramework/PSFramework.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
RootModule = 'PSFramework.psm1'
55

66
# Version number of this module.
7-
ModuleVersion = '1.14.438'
7+
ModuleVersion = '1.14.441'
88

99
# ID used to uniquely identify this module
1010
GUID = '8028b914-132b-431f-baa9-94a6952f21ff'

PSFramework/bin/PSFramework.dll

0 Bytes
Binary file not shown.

PSFramework/bin/PSFramework.pdb

0 Bytes
Binary file not shown.

PSFramework/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## 1.14.441 (2026-06-03)
4+
5+
- Fix: New-PSFCache - timer only removes one expired item at a time
6+
- Fix: TabExpansion - Trained results do not show with cached completion
7+
- Fix: TabExpansion - Trained results do not duplicate equal cached results
8+
39
## 1.14.438 (2026-05-31)
410

511
- New: New-PSFCache - creates a configurable in-memory cache.

PSFramework/internal/scripts/teppSimpleCompleter.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@
149149

150150
if (-not $scriptContainer.ShouldExecute) {
151151
if ($scriptContainer.Trained.Count -gt 0) {
152-
$allItems = @($scriptContainer.LastCompletion) + ($scriptContainer.Trained | ConvertTo-TeppCompletionEntry)
152+
$allItems = @($scriptContainer.LastCompletion) + ($scriptContainer.Trained | ConvertTo-TeppCompletionEntry | Where-Object { $_.Text -notin $scriptContainer.LastCompletion.Text })
153153
}
154154
else { $allItems = $scriptContainer.LastCompletion }
155-
$allResults = foreach ($item in ($scriptContainer.LastCompletion | Where-Object Text -Match $scriptContainer.GetPattern($wordToComplete) | Sort-Object @sortParam)) {
155+
$allResults = foreach ($item in ($allItems | Where-Object Text -Match $scriptContainer.GetPattern($wordToComplete) | Sort-Object @sortParam)) {
156156
New-PSFTeppCompletionResult -CompletionText $item.Text -ToolTip $item.ToolTip -ListItemText $item.ListItemText -AlwaysQuote:$alwaysQuote
157157
}
158158

library/PSFramework/Caching/CacheBase.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ private void Clean(object source, ElapsedEventArgs e)
299299
{
300300
try
301301
{
302-
foreach (CachedData entry in base.Values)
302+
CachedData[] tempData = new CachedData[base.Values.Count];
303+
base.Values.CopyTo(tempData, 0);
304+
305+
foreach (CachedData entry in tempData)
303306
if (entry.IsExpired)
304307
entry.DisposeIfExpired();
305308
}

notes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Notes
2+
3+
> PSFCache
4+
5+
+ Remove does not work
6+
7+
> Tab Completion
8+
9+
+ CacheDuration disables manually trained values
10+
+ Mixing results with trained values leads to duplicates

0 commit comments

Comments
 (0)