Guava Cache returns stale values during refresh
chakravarthyvp opened this issue · 1 comments
chakravarthyvp commented
Stencil uses Guava cache for caching protobufs.
On a get() on a key that is expiring for a refresh, the CacheLoader Async reload from the LocalCache(guava) tries to reload the cache for key, however stale values are returned with the cache not updated.
The reload provides a callable future task which looks like a race condition to cache's parallel get calls. A simple solution is to return a new value synchronously.
mauliksoneji commented
Resolved by #4