We implement a template in which our client checks to see if a document exists in Redis, and if not, we retrieve data from the database.
We are trying to handle the case when the Redis server is unavailable or unavailable, so we can immediately extract from the database.
However, when we test our code by intentionally deleting the Redis server, the Redis call through the ServiceStack client does not expire after 20 seconds.
We tried to use the RedISClient.SendTimeout property for various values ββ(1000, 100, 1), but the timeout always occurs after about 20 seconds. We also tried using the .Ping () method, but had the same problem.
Question: how can we handle the scenario when the Redis server is disconnected and we want to switch to the database selection faster?
source share