DiscordCache
The DiscordCache
class provides a caching mechanism for storing and retrieving data associated with Discord objects.
Properties
cache
DiscordCache.cache :: {
{ [string]: any } }
{ [string]: any } }
type
DiscordCache.type :: string
The type of the DiscordCache. Default is “DiscordCache”.
Methods
setData
DiscordCache : setData () -> ()
cacheType: string
uuid: string
data: any
Sets data in the cache.
getData
DiscordCache : getData () -> any
cacheType: string
uuid: string
Gets data from the cache.
getDataOr
DiscordCache : getDataOr () -> any
cacheType: string
uuid: string
callback: function
Gets data from the cache, or calls a callback to generate and cache the data if not found.
Functions
new
DiscordCache . new () -> ()
Creates a new DiscordCache instance.