mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-04-30 06:37:36 +00:00
[Change] CacheStore-Local 删除不可能条件;
[Change] HashCacheStore 删除不可能条件(Hashtable 在 put 中已经进行了 Null 检查);
This commit is contained in:
parent
70cf231842
commit
5246df6b50
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user