diff --git a/leaderboards/tasks.py b/leaderboards/tasks.py index 3627819..3445100 100644 --- a/leaderboards/tasks.py +++ b/leaderboards/tasks.py @@ -51,7 +51,7 @@ def update_global_leaderboard_top_5_score_cache(leaderboard_id: int): cache.set( f"leaderboards::global_leaderboard_top_5_scores::{leaderboard.id}", scores, - 1800, + 7200, ) return scores diff --git a/leaderboards/views.py b/leaderboards/views.py index fb2cbf2..c845dad 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), - 1800, + 7200, ) else: scores = leaderboard.get_top_scores(limit=limit) diff --git a/osuchan/settings.py b/osuchan/settings.py index 2a58d5f..074bfe1 100644 --- a/osuchan/settings.py +++ b/osuchan/settings.py @@ -204,9 +204,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-20-minutes": { + "update-global-leaderboard-top-5-score-cache-every-hour": { "task": "leaderboards.tasks.dispatch_update_global_leaderboard_top_5_score_cache", - "schedule": crontab(minute="*/20"), + "schedule": crontab(minute="0"), }, "update-loved-beatmaps-every-month": { "task": "profiles.tasks.update_loved_beatmaps",