0

Suppose due to network failure redis went down for some time . How will i figure out after it up. Is there any event that i can subscribe in the Client (StackExchange.Redis ) so that it notifies me?

user1844634
  • 1,221
  • 2
  • 17
  • 35

1 Answers1

0

There are several events on the ConnectionMultiplexer of the StackExchange.Redis client you can subscribe to, for example the ConnectionRestored event, which is probably the one you want.

To use that together with CacheManager, you might want to instantiate the Multiplexer and pass that into the .WithRedisConfiguration part of your configuration.

Then, you can subscribe to all those events.

CacheManager itself doesn't expose those events nor the client. This means, there is no other way to get to those objects then creating the Multiplexer in the beginning.

If you think that this is a feature you need, feel free to add a feature request on GitHub.

MichaC
  • 13,104
  • 2
  • 44
  • 56