Skip to content

Commit

Permalink
Accelerate score expiry for beatmaps with very few scores
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Dec 16, 2024
1 parent 4906149 commit 0cb24f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GlobalRankLookupCache/Controllers/BeatmapItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public BeatmapItem(int beatmapId, string highScoresTable)
if (isQualified && (DateTime.Now - lastPopulation).TotalSeconds > 60)
_ = Task.Run(repopulateScores);
// Re-populate if enough time has passed and enough requests were made.
else if ((DateTime.Now - lastPopulation).TotalSeconds > Scores.Count && requestsSinceLastPopulation >= 5)
else if ((DateTime.Now - lastPopulation).TotalSeconds > Scores.Count && (Scores.Count < 1000 || requestsSinceLastPopulation >= 5))
_ = Task.Run(repopulateScores);

Interlocked.Increment(ref RankLookupController.Hits);
Expand Down

0 comments on commit 0cb24f9

Please sign in to comment.