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

Link to this function

child_spec(init_arg)

View Source (since 0.5.0)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

create(channel)

View Source (since 0.5.0)
@spec create(map()) :: Nostrum.Struct.Channel.t()

Converts and creates the given map as a channel in the cache.

Link to this function

delete(id)

View Source (since 0.5.0)

Delete the channel from the cache by ID.

Link to this function

init(init_arg)

View Source (since 0.5.0)

Set up the cache's ETS table.

Link to this function

query_handle()

View Source (since 0.8.0)
@spec query_handle() :: :qlc.query_handle()

Retrieve a query handle for usage with QLC.

Link to this function

start_link(init_arg)

View Source (since 0.5.0)

Start the supervisor.

@spec table() :: :ets.table()

Retrieve the ETS table reference used for the cache.

Link to this function

update(channel)

View Source (since 0.5.0)

Update the given channel in the cache.