add ranking cache

This commit is contained in:
咕谷酱
2025-08-21 21:35:08 +08:00
parent 56e83fa098
commit b316511cf5
4 changed files with 879 additions and 18 deletions

View File

@@ -142,6 +142,13 @@ class Settings(BaseSettings):
beatmap_cache_expire_hours: int = 24
max_concurrent_pp_calculations: int = 10
enable_pp_calculation_threading: bool = True
# 排行榜缓存设置
enable_ranking_cache: bool = True
ranking_cache_expire_minutes: int = 10 # 排行榜缓存过期时间(分钟)
ranking_cache_refresh_interval_minutes: int = 10 # 排行榜缓存刷新间隔(分钟)
ranking_cache_max_pages: int = 20 # 最多缓存的页数
ranking_cache_top_countries: int = 20 # 缓存前N个国家的排行榜
# 反作弊设置
suspicious_score_check: bool = True