ironmansoftware / issues

Public Issue tracker for Ironman Software products.
https://ironmansoftware.com
32 stars 2 forks source link

Set-PSUCache Doc Clarification? #3350

Closed Omzig closed 1 month ago

Omzig commented 1 month ago

Version

4.2.21

Severity

Medium

Environment

Nested IIS

Steps to Reproduce

so, maybe i am losing my mind but, i cannot get Set-PSUCache to work....

https://docs.powershelluniversal.com/platform/cache#server-level-cache

Set-PSUCache -Key "CurrentDate" -Value (Get-Date)

Expected behavior

$cache:CurrentDate
returns a date

Actual behavior

$cache:CurrentDate
returns null

Additional Environment data

No response

Screenshots/Animations

No response

Omzig commented 1 month ago

Welp, looks like i missed a key part of the doc!!!!! I totally was reading $cache in context of the Set-PSUCache. https://docs.powershelluniversal.com/platform/cache#usdcache-scope $Cache scope differs from the server-level cache as it only resides

@adamdriscoll, maybe this is a doc update, maybe put that in a info block like this: image

$Cached Scope vs Server-Level Cache: 
The $Cache scope differs from the server-level cache as it only resides in the execution environment of feature you are using. They are different and cannot be used to get the other one.