diff --git a/leaderboards/tasks.py b/leaderboards/tasks.py index 7f777f8..6183756 100644 --- a/leaderboards/tasks.py +++ b/leaderboards/tasks.py @@ -125,7 +125,7 @@ def update_global_leaderboard_top_5_score_cache(): cache.set( f"leaderboards::global_leaderboard_top_5_scores::{leaderboard.id}", scores, - 900, + 1800, ) diff --git a/leaderboards/views.py b/leaderboards/views.py index 83f497d..5d1d2c9 100644 --- a/leaderboards/views.py +++ b/leaderboards/views.py @@ -288,7 +288,7 @@ def get(self, request, leaderboard_type, gamemode, leaderboard_id): scores = cache.get_or_set( f"leaderboards::global_leaderboard_top_5_scores::{leaderboard.id}", lambda: leaderboard.get_top_scores(limit=limit), - 900, + 1800, ) else: scores = leaderboard.get_top_scores(limit=5) diff --git a/osuchan/settings.py b/osuchan/settings.py index 34460c6..1914ab7 100644 --- a/osuchan/settings.py +++ b/osuchan/settings.py @@ -200,9 +200,9 @@ class EnvSettings(BaseSettings): "task": "profiles.tasks.dispatch_update_all_global_leaderboard_top_members", "schedule": crontab(minute=0, hour=0), # midnight UTC }, - "update-global-leaderboard-top-5-score-cache-every-10-minutes": { + "update-global-leaderboard-top-5-score-cache-every-20-minutes": { "task": "leaderboards.tasks.update_global_leaderboard_top_5_score_cache", - "schedule": crontab(minute="*/10"), + "schedule": crontab(minute="*/20"), }, }