[Change] CacheStore-Local 删除不可能条件;

[Change] HashCacheStore 删除不可能条件(Hashtable 在 put 中已经进行了 Null 检查);
This commit is contained in:
LamGC 2021-01-01 10:03:26 +08:00
parent 70cf231842
commit 5246df6b50
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D

View File

@ -109,7 +109,7 @@ public abstract class HashCacheStore<V> implements CacheStore<V>, Cleanable {
AtomicLong cleanCount = new AtomicLong(0); AtomicLong cleanCount = new AtomicLong(0);
cacheMap.keySet().removeIf(key -> { cacheMap.keySet().removeIf(key -> {
CacheItem<V> item = cacheMap.get(key); CacheItem<V> item = cacheMap.get(key);
if (item != null && item.isExpire(currentDate)) { if (item.isExpire(currentDate)) {
cleanCount.incrementAndGet(); cleanCount.incrementAndGet();
return true; return true;
} }