1
0
Fork 0
mirror of https://github.com/xHyroM/lighteco.git synced 2024-09-19 21:03:18 +02:00

fix(ExpiringSet): lifetime must be millis

This commit is contained in:
Jozef Steinhübl 2023-09-01 21:15:36 +02:00 committed by GitHub
parent 8112b41d12
commit 9c8e459ca8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@ public class ExpiringSet<T> {
this.cache = CacheBuilder.newBuilder()
.expireAfterWrite(duration, unit)
.build();
this.lifetime = duration;
this.lifetime = unit.toMillis(duration);
}
public boolean add(T item) {