This commit is contained in:
parent
6f5b03d73e
commit
cb6526c845
@ -58,7 +58,15 @@ public class AutoExpireCache<K, V> implements Cache<K, V> {
|
||||
|
||||
@Override
|
||||
public V get(K key, Callable<? extends V> call) throws Exception {
|
||||
return this.delegate.get(key, call);
|
||||
V cachedValue = this.get(key);
|
||||
if (null == cachedValue) {
|
||||
V v2 = call.call();
|
||||
this.put(key, v2);
|
||||
return v2;
|
||||
|
||||
}
|
||||
return cachedValue;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user