Hash-keyed provision cache. ensure/3 returns a cached provider handle for a given
{provider, spec}, calling provider.provision/2 only on a miss. The handle is the
durable artifact; where the {hash → handle} mapping lives is pluggable via the
ReqManagedAgents.Provisioner.Store behaviour (:store option) — in-process ETS by
default, or a persistent store (e.g. Store.File) for reuse across OS processes.
Summary
Functions
@spec ensure(module(), ReqManagedAgents.Provider.spec(), keyword()) :: {:ok, ReqManagedAgents.Provider.handle()} | {:error, term()}
See ReqManagedAgents.Provisioner.Environments.ensure_environment/3.
@spec evict( ReqManagedAgents.Provider.handle(), keyword() ) :: :ok
Drop any cache entry whose value is handle (called after teardown). With a
persistent store (e.g. Store.File) the handle must be JSON-encodable —
same constraint as ensure/3's store writes; non-encodable values raise.
See ReqManagedAgents.Provisioner.Environments.prune_environments/3.