mirror of
https://github.com/xHyroM/lighteco.git
synced 2024-11-23 23:31:05 +01:00
fix(ExpiringSet): lifetime must be millis
This commit is contained in:
parent
8112b41d12
commit
9c8e459ca8
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ public class ExpiringSet<T> {
|
||||||
this.cache = CacheBuilder.newBuilder()
|
this.cache = CacheBuilder.newBuilder()
|
||||||
.expireAfterWrite(duration, unit)
|
.expireAfterWrite(duration, unit)
|
||||||
.build();
|
.build();
|
||||||
this.lifetime = duration;
|
this.lifetime = unit.toMillis(duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean add(T item) {
|
public boolean add(T item) {
|
||||||
|
|
Loading…
Reference in a new issue