fix[cache]: sync refresh cache to avoid getting a old value after long time

This commit is contained in:
godotg committed 2023-08-13 18:05:08 +08:00
1 parent 4513db8bed
commit 54516dd531
1 file changed
+1 -1
@@ -61,7 +61,7 @@ public class SingleCache<V> {
try {
if (now > refreshTime) {
refreshTime = now + refreshDuration;
EventBus.asyncExecute(() -> cache = supplier.get());
cache = supplier.get();
}
} finally {
lock.unlock();