ETS-backed cache with per-entry TTL.
Used by ExFPL.Bootstrap.fetch/1 to avoid re-downloading the ~1 MB
bootstrap-static payload on every call. Started under the application
supervisor; the underlying ETS table is always available while the
application is running.
Summary
Functions
Returns a specification to start this module under a supervisor.
Fetch a value from the cache. Returns {:ok, value} or :miss.
Remove a single key, or all entries when called with :all (default).
Insert a value with an optional TTL in milliseconds (default 1 hour).
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Fetch a value from the cache. Returns {:ok, value} or :miss.
@spec invalidate(term() | :all) :: :ok
Remove a single key, or all entries when called with :all (default).
@spec put(term(), term(), non_neg_integer()) :: :ok
Insert a value with an optional TTL in milliseconds (default 1 hour).