A UserDataCache<T> is a utility class that stores some generic type per player gamertag. More...
Classes | |
class | UserDataCacheEntry |
Public Member Functions | |
delegate UserDataCache< T > | FactoryFunction (string name, long ttlMs, CacheResolver resolver, IDependencyProvider provider) |
A general purpose factory function that returns a new instance of the UserDataCache<T>. | |
delegate Promise< Dictionary< long, T > > | CacheResolver (List< long > gamerTags) |
A UserDataCache<T> has a mapping from player gamertags to some generic type per player. This function takes a set of gamertags, and fetches the latest data for each. | |
abstract Promise< T > | Get (long gamerTag) |
Get the given player's data. If the data does not exist in the cache yet, the CacheResolver function will be triggered to resolve the data. More... | |
abstract Promise< Dictionary< long, T > > | GetBatch (List< long > gamerTags) |
Get multiple players' data. If the players do not have the data in the cache yet, the CacheResolver function will be triggered to resolve all the data. More... | |
abstract void | Set (long gamerTag, T data) |
Manually set the player data More... | |
abstract void | Remove (long gamerTag) |
Remove a player from the cache. The next time this player's data is requested, the CacheResolver will be used to get the latest data for the player More... | |
A UserDataCache<T> is a utility class that stores some generic type per player gamertag.
T |
|
pure virtual |
Get the given player's data. If the data does not exist in the cache yet, the CacheResolver function will be triggered to resolve the data.
gamerTag | The gamertag for the player to get data for. |
Implemented in Beamable.Api.UnityUserDataCache< T >.
|
pure virtual |
Get multiple players' data. If the players do not have the data in the cache yet, the CacheResolver function will be triggered to resolve all the data.
gamerTags | A set of gamertags |
Implemented in Beamable.Api.UnityUserDataCache< T >.
|
pure virtual |
Remove a player from the cache. The next time this player's data is requested, the CacheResolver will be used to get the latest data for the player
gamerTag | The gamertag of the player to remove from the cache |
Implemented in Beamable.Api.UnityUserDataCache< T >.
|
pure virtual |
Manually set the player data
gamerTag | The gamertag of the player to set data for |
data | The player's new data, which will overwrite the old data. |
Implemented in Beamable.Api.UnityUserDataCache< T >.