Make Cache.get(key, mappingFunction) fail all waiting threads too if mappingFunction fails in Caffeine

57 Views Asked by At

Make Cache.get(key, mappingFunction) fail all waiting threads too if mappingFunction fails in Caffeine

If 3 threads come in parallel then currently if first get call fail after 1 mins, then second fail after 2 mins, third in 3mins and so on.

I want if first get call fails then all waiting threads on get should also fail.

1

There are 1 best solutions below

0
user3676029 On

I tried with buildAsync().synchronous() and it worked. Thank you Ben Manes