Don't keep unlinked account cached forever

This commit is contained in:
Vankka 2024-06-24 23:43:55 +03:00
parent a4d499153d
commit 1e9e1c53e2
No known key found for this signature in database
GPG Key ID: 62E48025ED4E7EBB

View File

@ -55,9 +55,6 @@ public abstract class CachedLinkProvider implements LinkProvider {
.expireAfter(new Expiry<UUID, Long>() {
@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;
}