Question

I just tested putting something in an AppFabric cache, and I'm struggling now with how to simply view the items in the cache. Surprisingly, google hasn't helped. In PowerShell, I can view the caches easily enough with get-cache.

What PowerShell command is there to view the items in a cache?

Était-ce utile?

La solution

There isn't one.

And if you think about it, there can't be one - what would it output? If you have simple values like strings or integers in your cache, then it's reasonably clear that you could just iterate over the cache outputting the key-value pairs. But if you have complex (and potentially nested) objects in your cache, or maybe a List containing a large number of objects, what do you output then? The key and the type? Some kind of Id property that may or may not exist?

There can't be a one-size-fits-all Powershell command that Microsoft could supply out of the box to do this that would cope with any kind of object it might encounter in the cache.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top