Skip to content

Commit

Permalink
Prevent expiration if timeToLive is non-positive (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruViolence authored Nov 21, 2024
1 parent 80e71a7 commit a8f76ac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public String signature() {
@ApiStatus.Internal
public record SkinCacheData(@NotNull SkinData skinData, long lastUpdated, long timeToLive) {
public boolean isExpired() {
return System.currentTimeMillis() - lastUpdated > timeToLive;
return timeToLive > 0 && System.currentTimeMillis() - lastUpdated > timeToLive;
}
}
}

0 comments on commit a8f76ac

Please sign in to comment.