commit | 725a31f7315815656dadf4c11287fa567d7b6300 | [log] [tgz] |
---|---|---|
author | Eric Anderson <ejona@google.com> | Wed Jun 26 14:57:35 2013 -0700 |
committer | Eric Anderson <ejona@google.com> | Fri Jun 28 09:20:52 2013 -0700 |
tree | 5387d0a7b9a03c5def5c5808d633b41d5b9b71b6 | |
parent | d61f308ff72c60e97fc3add124f6b091a4a445c7 [diff] |
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.