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