From 1e9e1c53e2cc2d154111d7ee94d24453bfe2816a Mon Sep 17 00:00:00 2001 From: Vankka Date: Mon, 24 Jun 2024 23:43:55 +0300 Subject: [PATCH] Don't keep unlinked account cached forever --- .../discordsrv/common/linking/impl/CachedLinkProvider.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/common/src/main/java/com/discordsrv/common/linking/impl/CachedLinkProvider.java b/common/src/main/java/com/discordsrv/common/linking/impl/CachedLinkProvider.java index fe97b45e..b8a126ec 100644 --- a/common/src/main/java/com/discordsrv/common/linking/impl/CachedLinkProvider.java +++ b/common/src/main/java/com/discordsrv/common/linking/impl/CachedLinkProvider.java @@ -55,9 +55,6 @@ public abstract class CachedLinkProvider implements LinkProvider { .expireAfter(new Expiry() { @Override public long expireAfterCreate(@NonNull UUID key, @NonNull Long value, long currentTime) { - if (value == UNLINKED_USER) { - return Long.MAX_VALUE; - } return TimeUnit.MINUTES.toNanos(5); } @@ -68,9 +65,6 @@ public abstract class CachedLinkProvider implements LinkProvider { long currentTime, @NonNegative long currentDuration ) { - if (value == UNLINKED_USER) { - return Long.MAX_VALUE; - } return currentDuration; }