ETS-backed module cache keyed by {path, mtime}.
Caches compiled output so repeated requests for unchanged files skip the compilation step entirely.
Summary
Functions
Clear all cached entries.
Create the cache ETS table. Called once from Application.start/2.
Evict all entries for a cache key (any mtime).
Evict all cache entries derived from a file path, including variant keys like path <> "?import".
Look up a cached entry. Returns nil on miss.
Store a compiled entry.
Types
@type entry() :: %{ code: String.t(), sourcemap: String.t() | nil, css: String.t() | nil, hashes: Volt.Pipeline.Result.Hashes.t() | nil, content_type: String.t() }
Functions
@spec clear() :: :ok
Clear all cached entries.
@spec create_table() :: :ok
Create the cache ETS table. Called once from Application.start/2.
@spec evict(String.t()) :: :ok
Evict all entries for a cache key (any mtime).
@spec evict_file(String.t()) :: :ok
Evict all cache entries derived from a file path, including variant keys like path <> "?import".
Look up a cached entry. Returns nil on miss.
Store a compiled entry.