Crux v2020-03-17 17:55:51Z Crux.Cache.Guild View Source

Default Crux.Structs.Channel cache.

Unlike other caches this one splits up to different guild processes handling their data individually.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Deletes a

Fetches a guild from the cache by id.

Fetches a guild from the cache by id, raises if not found.

Inserts a

Looks up the pid/0 of a Crux.Cache.Guild's GenServer by guild id.

Updates or inserts a

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Deletes a:

Link to this function

fetch(guild_id) View Source
fetch(guild_id :: Crux.Rest.snowflake()) ::
  {:ok, Crux.Structs.Guild.t()} | :error

Fetches a guild from the cache by id.

Fetches a guild from the cache by id, raises if not found.

Link to this function

insert(data) View Source
insert(data :: term()) :: term()

Inserts a:

Link to this function

lookup(guild_id) View Source
lookup(guild_id :: Crux.Rest.snowflake()) :: {:ok, pid()} | :error

Looks up the pid/0 of a Crux.Cache.Guild's GenServer by guild id.

Link to this function

update(data) View Source
update(data :: term()) :: term()

Updates or inserts a: