cb372/scalacache

CaffeineCache should be using blocking instead of delay

froth opened this issue · 1 comments

froth commented

Caffeine is based on ConcurrentHashMap which uses locks when writing and therefore at least the write operations can lead to blocking the current thread. Therefore from my understanding it should be wrapped in blocking instead of delay.

https://github.com/cb372/scalacache/blob/master/modules/caffeine/src/main/scala/scalacache/caffeine/CaffeineCache.scala

here is written Caffeine as non-blocking:
https://blog.frankel.ch/choose-cache/2/