use invalidate instead of Map#remove
This commit is contained in:
parent
f652cb1d1c
commit
98b392d528
@ -206,7 +206,7 @@ public final class ExpiringSet<E> extends AbstractSet<E> implements Set<E> {
|
||||
@Override
|
||||
public boolean remove(Object o) {
|
||||
boolean present = contains(o);
|
||||
this.cache.asMap().remove(o);
|
||||
this.cache.invalidate(o);
|
||||
return present;
|
||||
}
|
||||
|
||||
@ -344,6 +344,6 @@ public final class ExpiringSet<E> extends AbstractSet<E> implements Set<E> {
|
||||
*/
|
||||
@Override
|
||||
public void clear() {
|
||||
this.cache.asMap().clear();
|
||||
this.cache.invalidateAll();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user