Skip to content

Commit

Permalink
Refresh positions less often
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgeiss0702 committed Jan 23, 2023
1 parent ee4b707 commit ff1b9bb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/us/ajg0702/leaderboards/boards/TopManager.java
Expand Up @@ -62,7 +62,7 @@ public TopManager(LeaderboardPlugin pl, List<String> initialBoards) {
List<PositionBoardType> positionFetching = new CopyOnWriteArrayList<>();
LoadingCache<PositionBoardType, StatEntry> positionCache = CacheBuilder.newBuilder()
.expireAfterAccess(1, TimeUnit.HOURS)
.refreshAfterWrite(1, TimeUnit.SECONDS)
.refreshAfterWrite(5, TimeUnit.SECONDS)
.maximumSize(10000)
.removalListener(notification -> positionLastRefresh.remove((PositionBoardType) notification.getKey()))
.build(new CacheLoader<PositionBoardType, StatEntry>() {
Expand All @@ -86,7 +86,6 @@ public TopManager(LeaderboardPlugin pl, List<String> initialBoards) {
}
});

int b = 0;
/**
* Get a leaderboard position
* @param position The position to get
Expand Down

0 comments on commit ff1b9bb

Please sign in to comment.