From 9c8e459ca8b172e948793c7653147c78c7af5ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Fri, 1 Sep 2023 21:15:36 +0200 Subject: [PATCH] fix(ExpiringSet): lifetime must be millis --- .../main/java/dev/xhyrom/lighteco/common/cache/ExpiringSet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/dev/xhyrom/lighteco/common/cache/ExpiringSet.java b/common/src/main/java/dev/xhyrom/lighteco/common/cache/ExpiringSet.java index 45b40b3..22c95e3 100644 --- a/common/src/main/java/dev/xhyrom/lighteco/common/cache/ExpiringSet.java +++ b/common/src/main/java/dev/xhyrom/lighteco/common/cache/ExpiringSet.java @@ -13,7 +13,7 @@ public class ExpiringSet { this.cache = CacheBuilder.newBuilder() .expireAfterWrite(duration, unit) .build(); - this.lifetime = duration; + this.lifetime = unit.toMillis(duration); } public boolean add(T item) {