AshCache.Supervisor (AshCache v0.1.0)

Copy Markdown View Source

Starts every cache store declared by the app's resources — the "zero manual init" half of the extension. Add it once to the application's supervision tree:

{AshCache.Supervisor, otp_app: :my_app}

It walks config :my_app, ash_domains: [...], collects the distinct store names of resources using AshCache.Resource, and supervises one Cachex instance per store. Resources added later are picked up on the next boot with no further wiring.

Summary

Functions

Returns a specification to start this module under a supervisor.

The distinct store names declared by the given domains' cached resources.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

store_names(domains)

@spec store_names([module()]) :: [atom()]

The distinct store names declared by the given domains' cached resources.