Bounded in-memory cache for verified remote resources.
Entries retain encoded bytes, fingerprints, and HTTP validators. Fresh entries are returned directly; stale entries are available only for conditional revalidation. The table is local to one BEAM node.
Summary
Functions
Returns a specification to start this module under a supervisor.
Fetches a non-expired cached resource.
Returns a cached resource even after its freshness TTL has elapsed.
Inserts one cache entry and clears the cache before it can exceed its bounds.
Creates the private ETS table used by the cache.
Stores a resource for ttl milliseconds while enforcing configured bounds.
Starts the process that owns the resource ETS table.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Fetches a non-expired cached resource.
Returns {:ok, resource} or :error, following Map.fetch/2.
Returns a cached resource even after its freshness TTL has elapsed.
The remote loader uses stale entries only to send conditional validators or
to reuse bytes after a 304 Not Modified response.
Inserts one cache entry and clears the cache before it can exceed its bounds.
Creates the private ETS table used by the cache.
Stores a resource for ttl milliseconds while enforcing configured bounds.
The default bounds are 128 entries and 25,000,000 bytes. When an insertion would exceed either bound, the current table is cleared first.
Starts the process that owns the resource ETS table.