class RLS::Memory::Player

Overview

Cache for Player objects. Player objects are considered valid until their expiry time of Player#next_update is reached.

Defined in:

rls/cache.cr

Instance Method Summary

Instance Method Detail

def cache(player : RLS::Player) #

Stores a player in the cache


[View source]
def prune #

Prunes the cache of expired players


[View source]
def resolve(id : String, platform : RLS::Platform) : RLS::Player | Nil #

Resolves a player from the cache. Returns nil if the stored player data is due for an update.


[View source]