Compiled functions by source (spec/08 §10.5.3, D-194): a value, held by whatever owns the functions — a board's engine, the builder — not a process or a table, as the schema cache is (spec/08 §10.3).
An entry is keyed by the SHA-256 of the source, the arity and the fields it was checked
against, and holds the compilation's answer, a refusal included, so a source is checked
and compiled once. A compilation the runner cut short (:timeout, :memory) is not
kept, since it says nothing about the source. The cache never evicts.
Summary
Functions
compile(cache, source, opts): {:ok, compiled, cache} or {:error, faults, cache},
as Visualize.VirtualSource.Sandbox.compile/2 answers, compiled at most once per
source, arity and fields.
The empty cache.
Types
@type t() :: %Visualize.VirtualSource.Sandbox.Cache{entries: map()}
Functions
@spec compile(t(), String.t(), keyword()) :: {:ok, Visualize.VirtualSource.Sandbox.Compiled.t(), t()} | {:error, [Visualize.VirtualSource.Sandbox.fault(), ...], t()}
compile(cache, source, opts): {:ok, compiled, cache} or {:error, faults, cache},
as Visualize.VirtualSource.Sandbox.compile/2 answers, compiled at most once per
source, arity and fields.
@spec new() :: t()
The empty cache.