Closed shah-keyur closed 5 years ago
No, there is no such thing of making a layer readonly or even allow the cache overall to continue to work when Redis is used but not available. You'll simply get exceptions and have to deal with that in your application logic. Same as if you'd use a Redis client only.
I know, it would be great if all that complexity would be handled by CacheManager. Long story short, there is simply no easy way to achieve that and therefor, I'm not even trying to ;)
Hi MichaCo,
What happens when Redis is down and trying to do put operation when in-memory is configured with Redis.
I guess in-memory will have the latest value for a key but Redis will not, right?
Is there a way we can just make the in-memory read-only?
var cache = CacheFactory.Build(settings =>
{
settings
.WithMemoryCacheHandle().And
.WithRedisConfiguration("redis", "localhost:6379,allowAdmin=true")
.WithRedisCacheHandle("redis");
});
Thanks, Keyur