I am using Memcache in my ASP.NET application. I have 3 memcache servers that it connects to. If all of them are down, there is a significant delay in loading the pages. When all servers are down, I would want to not use memcache.
When I was stepping through the code, I noticed that when the servers are down, memcache code does not throw an exception (I thought I could “Catch” it in my application and take the necessary steps).
How would I handle this situation?
Since Enyim is Open Source, you could edit ServerPool.cs, like so:
I haven’t tested above code. BTW, my changes are these three lines:
You should also create
NoMoreServersException(or use a generic exception (not advisable though)).