mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-09-03 04:18:59 +00:00
fix[cache]: sync refresh cache to avoid getting a old value after long time
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user