Leaderboard Around Owner

Hello!

I am using Nakama 3.21.1-r3 for my Unity Android game.

I am having an issue with ‘ListLeaderboardRecordsAroundOwnerAsync’.

When i call ‘ListLeaderboardRecordsAsync’ I can fetch something like a top 50 of scores, where everyone is perfectly ranked.

When i call ‘ListLeaderboardRecordsAroundOwnerAsync’ I noticed a lot of the ranks of the records being wrong. So of course at first I did some searching and reading here on the forum, where other developers have had the same experience, and found a few answers about this being the ‘server cache’ being loaded. Though, these answers go back to 2020-2022, so I figured it was okay to bring this up.

Someone mentioned restarting the server helped them out. So I did that, and now every record on my AroundPlayerLeaderboards is rank 0.

Anything that I can do to fix this? Should I make a separate ‘ListLeaderboardRecordsAsync’ for the owner themself, to actually fetch their ranks, and calculate every rank on the AroundPlayerLeaderboards ?

I guess it’s hard for me to understand why they don’t work the same way. Is there a way for me to invoke an update of ranks?

Hey :wave:
The leaderboard rank cache is asynchronously populated after the server restarts which could lead to some (usually very short) time when these calls may return zeros. In practice, however, unless you have tens of millions of leaderboard records, this shouldn’t be noticeable.
May I ask if your game is running on Heroic Cloud? If so, please feel free to reach to our support email: support@heroiclabs.com where we would have more information to better assist you.