Skip to content

Adds -NoEnumerate switch for Get-PodeCache to avoid IEnumerable unwrapping behaviour#1711

Merged
Badgerati merged 2 commits into
developfrom
Issue-1707
May 20, 2026
Merged

Adds -NoEnumerate switch for Get-PodeCache to avoid IEnumerable unwrapping behaviour#1711
Badgerati merged 2 commits into
developfrom
Issue-1707

Conversation

@Badgerati
Copy link
Copy Markdown
Owner

@Badgerati Badgerati commented May 19, 2026

Description of the Change

There is a new -NoEnumerate switch on Get-PodeCache, which will return IEnumerable items as-is and not have PowerShell attempt to unwrap them - such as Array, ArrayList, Queue, etc.

Related Issue

Resolves #1707

Examples

# create a queue object and cache it
$queue = [System.Collections.Queue]::new(10)
Set-PodeCache -Key 'Example' -InputObject $queue

# retrieve the raw queue object
$queue = Get-PodeCache -Key 'Example' -NoEnumerate

@Badgerati Badgerati added this to the 2.13.3 milestone May 19, 2026
@Badgerati Badgerati self-assigned this May 19, 2026
@Badgerati Badgerati changed the title Fixes cached items being unwrapped when they're IEnumerable Adds -NoEnumerate switch for Get-PodeCache to avoid IEnumerable unwrapping behaviour May 19, 2026
@Badgerati Badgerati merged commit 19ec140 into develop May 20, 2026
31 checks passed
@Badgerati Badgerati deleted the Issue-1707 branch May 20, 2026 20:58
@Badgerati Badgerati mentioned this pull request May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get/Set-PodeCache | [System.Collections.Queue] storages always returns a null

1 participant