Use async reload() in CacheLoader

CacheLoaders need asynchronous refresh()s for refreshAfterWrite() to
work effectively. The Cache will call CacheLoader.refresh() when
appropriate during a get() due to refreshAfterWrite(), but if the
refresh() blocks, then that is effectively as if the element expired.
With an asynchronous reload(), the reloading starts on that get() but
users of the Cache see the old value until refresh() completes.
2 files changed