Keeps the domains of Sovite.Core.Repo.Tables.Domains in :persistent_term, so
every recipient check can read them without a database query.
The list is read at start and every :interval (default 10 seconds).
When the database cannot be read, the last list stays in use.
Options
:repo- theSovite.Core.Reporeference. Required.:id- names the cache, forclasses/1. Defaults toid/1of the repo.:interval- milliseconds between refreshes.
Telemetry
[:sovite, :domains, :error]-%{},%{reason}
Summary
Functions
The cached domains of cache id: name to class. Empty before the first read.
The cache ID for Sovite's database repo.
Starts the cache.
Functions
@spec classes(term()) :: %{ required(String.t()) => Sovite.Core.Repo.Schemas.Domain.kind() }
The cached domains of cache id: name to class. Empty before the first read.
@spec id(Sovite.Core.Repo.t()) :: term()
The cache ID for Sovite's database repo.
@spec start_link(keyword()) :: GenServer.on_start()
Starts the cache.