Merge pull request #1856 from anaer/patch-4

Update FIFOCache.java
This commit is contained in:
Golden Looly 2021-09-29 10:00:34 +08:00 committed by GitHub
commit 77fe41cef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,9 @@ public class FIFOCache<K, V> extends AbstractCache<K, V> {
CacheObj<K, V> co = values.next(); CacheObj<K, V> co = values.next();
if (co.isExpired()) { if (co.isExpired()) {
values.remove(); values.remove();
onRemove(co.key, co.obj);
count++; count++;
continue;
} }
if (first == null) { if (first == null) {
first = co; first = co;