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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top