View Source Nostrum.Cache.ChannelCache.ETS (Nostrum v0.8.0)
An ETS-based cache for channels outside of guilds.
The supervisor defined by this module will set up the ETS table associated with it.
If you need to get the table reference for the table used by this module,
please use the table/0
function.
Note that users should not call the functions not related to this specific
implementation of the cache directly. Instead, call the functions of
Nostrum.Cache.ChannelCache
directly, which will dispatch to the configured
cache.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Converts and creates the given map as a channel in the cache.
Delete the channel from the cache by ID.
Set up the cache's ETS table.
Retrieve a query handle for usage with QLC.
Start the supervisor.
Retrieve the ETS table reference used for the cache.
Update the given channel in the cache.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec create(map()) :: Nostrum.Struct.Channel.t()
Converts and creates the given map as a channel in the cache.
@spec delete(Nostrum.Struct.Channel.id()) :: :noop | Nostrum.Struct.Channel.t()
Delete the channel from the cache by ID.
Set up the cache's ETS table.
@spec query_handle() :: :qlc.query_handle()
Retrieve a query handle for usage with QLC.
Start the supervisor.
@spec table() :: :ets.table()
Retrieve the ETS table reference used for the cache.
@spec update(Nostrum.Struct.Channel.t()) :: {Nostrum.Struct.Channel.t() | nil, Nostrum.Struct.Channel.t()}
Update the given channel in the cache.