class RLS::Memory::Leaderboard
- RLS::Memory::Leaderboard
- Reference
- Object
Overview
Cache for leaderboards, which are arrays of players associated
with a particular stat type or game mode. Leaderboards are valid
(server-side) for EXPIRY_TIME
, as described in the RLS documentation.
TODO prune
method
Defined in:
rls/cache.crConstant Summary
-
EXPIRY_TIME =
15.minutes
-
The duration to hold onto leaderboards for
Instance Method Summary
-
#cache(type : RLS::REST::StatType | RLS::REST::RankedPlaylist, players : Array(RLS::Player))
Stores a leaderboard in the cache
-
#resolve(type : RLS::REST::StatType | RLS::REST::RankedPlaylist) : Array(RLS::Player) | Nil
Resolves a leaderboard from the cache.
Instance Method Detail
Stores a leaderboard in the cache
Resolves a leaderboard from the cache. Returns nil
if the stored
leaderboard is due for an update.