{"id":19777167,"url":"https://github.com/ppy/osu-global-rank-lookup-cache","last_synced_at":"2025-04-30T19:31:32.433Z","repository":{"id":55077202,"uuid":"296858817","full_name":"ppy/osu-global-rank-lookup-cache","owner":"ppy","description":"Caching layer for the most expensive of database operations","archived":false,"fork":false,"pushed_at":"2025-01-07T09:54:17.000Z","size":58,"stargazers_count":12,"open_issues_count":1,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-06T04:26:12.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ppy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-19T11:58:54.000Z","updated_at":"2025-04-04T04:35:49.000Z","dependencies_parsed_at":"2024-10-28T10:42:41.064Z","dependency_job_id":"aa9ae979-61f8-4c79-bcc5-3e7636a59f4c","html_url":"https://github.com/ppy/osu-global-rank-lookup-cache","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppy%2Fosu-global-rank-lookup-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppy%2Fosu-global-rank-lookup-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppy%2Fosu-global-rank-lookup-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppy%2Fosu-global-rank-lookup-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppy","download_url":"https://codeload.github.com/ppy/osu-global-rank-lookup-cache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251769351,"owners_count":21640887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T05:23:28.137Z","updated_at":"2025-04-30T19:31:32.022Z","avatar_url":"https://github.com/ppy.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# osu-global-rank-lookup-cache [![dev chat](https://discordapp.com/api/guilds/188630481301012481/widget.png?style=shield)](https://discord.gg/ppy)\n\n\nA memory-based caching layer for beatmap-rank lookups which cannot be easily optimised as a database/SQL level.\n\nIntended to handle queries which iterate over large sections of (already indexed) scores, where the overhead of counting rows becomes an issue.\n\n# Query API\n\n`/ranklookup?beatmapId={$beatmapId}\u0026score={$score}\u0026rulesetId={$mode}`\n\n`$beatmapId` - The beatmap ID to lookup\n`$score` - The achieved total score value\n`$mode` - The ruleset ID (0..3)\n\n# Response\n\nAn zero-index integer denoting the rank in the leaderboard for the provided score.\n\n# TODO\n\n- Currently this is only useful for global leaderboards. Mod filters cannot be applied, for instance.\n- After an initial query, the queried beatmap will be tracked permanently. There is no cache expiry, so the potential of saturating available memory is real. LRU expiry should be implemented.\n- More correctly handling top 50 lookups where score collisions are feasible (need to fallback to ID).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppy%2Fosu-global-rank-lookup-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppy%2Fosu-global-rank-lookup-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppy%2Fosu-global-rank-lookup-cache/lists"}