ETS-based cache for Discord channels.
Uses composite keys {guild_id, channel_id} for O(guild_size) lookups
via for_guild/1 instead of full table scans. A reverse index table
maps channel_id to guild_id for efficient single-channel lookups.
DM channels use nil as their guild_id.
Summary
Functions
Gets all cached channels.
Returns a specification to start this module under a supervisor.
Returns the number of cached channels.
Creates or replaces a channel in the cache.
Deletes a channel from the cache.
Removes all channels for a guild.
Gets all channels for a guild. O(guild_size) via match_object.
Gets a channel from the cache by channel ID.
Updates a channel in the cache.
Functions
@spec all() :: [map()]
Gets all cached channels.
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec count() :: non_neg_integer()
Returns the number of cached channels.
Creates or replaces a channel in the cache.
Deletes a channel from the cache.
Removes all channels for a guild.
Gets all channels for a guild. O(guild_size) via match_object.
Gets a channel from the cache by channel ID.
Updates a channel in the cache.