CacheManager icon indicating copy to clipboard operation
CacheManager copied to clipboard

Is it possible to do cache eviction when backplane is down

Open jasonp123 opened this issue 4 years ago • 1 comments

We have multiple services with an in-memory cache backed by a redis backplane. This is also a read through cache, so if nothing is found in in-memory or redis, then it will call an endpoint to get the information (and then put in cache).

If Redis goes down, there is potential for the individual services to perform work on stale information because the source could modify the data, but the backplane wouldnt notify because it would be down. So I was wondering if cache manager can evict when a backplane is unavailable (so our services would end up calling the readthrough)

jasonp123 avatar May 10 '21 21:05 jasonp123

No that's not build in. I'm also not sure it ever will be because everyone might have different use cases for that. For example, I might be actually fine with having stale data for a while and can wait for Redis to come back online.

But I guess you could implement that yourself by checking if Redis is up from time to time and then clear the cache locally?

MichaCo avatar May 11 '21 00:05 MichaCo