Weird behaviour of $Cache: variables


I was developing one Web dashboard for some time with API. It’s finally working as expected on test server, but when I’ve tried to move it to it’s permanent location on different server, I’ve encounter very strange behavior of UDDashboard.

Some background and facts:
I’ve aligned modules versions and permissions as much as I could
I’m relying a lot on $Cache: variables. Various jobs collecting and processing data inside, presenting it globally in $Cache: variables. It all was working nice and dandy.
After moving code to new server - I’ve tested it function per function. It’s operational.
Ones dashboard launched, I can see through powershell and web PS in admin mode, that values are there.
Example :
PS UD:> $Cache:SNOWcomputers.count

Now the problem itself
Code like:
New-UDCounter -Title “Computers in SNOW” -AutoRefresh -Endpoint {
Doesn’t show anything, while data is clearly there and test server where I’ve developed it is working as intended.
Same for API endpoint. It doesn’t return any info, stored in $Cache: variables.

Please give at least general guidance on how to start troubleshooting here, as I’m really frustrated.

Not sure how is it related, but when accessing dashboard via FQDN - everything started to work as expected… Although I was accessing test server via short name only.
Anyway, case closed.

1 Like