Factory for creating and managing related keys with predefined configurations.
Define key templates once with define_key/3, then retrieve configured
Key objects with get_key_obj/3 or via key_obj/3.
Summary
Functions
Define a reusable key template. Returns updated ring.
Return the current global options map.
Return a Key populated from a defined template.
Return merged options for a tag: global -> per-tag -> extra.
Dynamic key object accessor.
Create a new KeyRing.
Replace the global options applied to all tags.
Set option overrides for a specific tag name.
Create a tag instance with merged options from the ring's configuration.
Types
Functions
Define a reusable key template. Returns updated ring.
params is a list where each element is either a tag name string
or a map with at least a "tag" key and optional overrides
("cache_handler", "type", "version", "prefix").
Return the current global options map.
Return a Key populated from a defined template.
Return merged options for a tag: global -> per-tag -> extra.
Dynamic key object accessor.
Supports key_obj(ring, :users, ["val1", "val2"]) style access
where :users or "users" matches a defined key name (case-insensitive).
Create a new KeyRing.
Options
:cache_handlers— map of name to handler struct (default:%{"memory" => Memory.new()}):default_cache_handler— name of the default handler (default:"memory"):default_prefix— prefix for tag names (default:"DefaultPrefix"):global_options— options merged into every tag (default:%{}):global_tag_options— per-tag-name option overrides (default:%{})
Replace the global options applied to all tags.
Set option overrides for a specific tag name.
Create a tag instance with merged options from the ring's configuration.