A memory-based caching layer for beatmap-rank lookups which cannot be easily optimised as a database/SQL level.
Intended to handle queries which iterate over large sections of (already indexed) scores, where the overhead of counting rows becomes an issue.
DB_HOST: Database host to use when performing lookups (default:localhost)DB_USER: Database user to use when performing lookups (default:root)USE_NEW_TABLES:- When
false, scores are looked up fromosu_scores_*_hightables, using the ID scheme used by those tables. - When
true, scores are looked up from the unifiedscorestable, using the ID scheme used by this table. - Mandatory, with no default.
- When
$beatmapId- The beatmap ID to lookup$score- The achieved total score value$mode- The ruleset ID (0..3)
Three comma-delimited values:
- An zero-index integer denoting the rank in the leaderboard for the provided score
- The count of all scores on the beatmap's leaderboard
- A boolean indicating whether both preceding counts are accurate or best-effort estimates
- Currently this is only useful for global leaderboards. Mod filters cannot be applied, for instance.
- More correctly handling top 50 lookups where score collisions are feasible (need to fallback to ID).
