Question

I have an AppFabric Cache installation (the cluster just has one node, viz. my local machine). I just saw the strangest behavior- I put something in the cache, then restarted the cache cluster using the AF Cache PowerShell command Restart-CacheCluster. When I then try to retrieve the value from the cache, it's still there.

Has anyone seen this behavior? Is it due to some configuration setting I'm missing? This is not causing me problems, but the fact that it is not behaving the way I expect scares me in case other issues arise later.

The cache is using a SQL Server database for configuration (as opposed to an XML file).

Was it helpful?

Solution

As specified here :

The Stop-CacheCluster or Restart-CacheCluster cache cluster commands cause all data to be flushed from the memory of all cache hosts in the cluster.

No, it's not possible and I've never seen this kind of issue. I suggest you check the whole process.

Are you using a Read-Through provider ? In that scenario, the cache detects the missing item and calls a specific provider to perform the data load. The item is then seamlessly returned to the cache client and will never be null.

Other things you may have to check

  • Check the result of Restart-CacheCluster cmdlet (sucess/failure)
  • Maybe a background task is still running, putting data into the cache
  • By using cmdlet Get-CacheStatistics, you can check how many items are really in the cache
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top