Beaver.MLIR.CompilationCache.File (beaver v0.4.8)

Copy Markdown

Filesystem backend for incremental compilation artifacts.

Entries are written through a temporary file and atomically renamed. Reads use safe Erlang term decoding; malformed entries are reported to the runtime, which invalidates them and recompiles.

Summary

Types

t()

@type t() :: %Beaver.MLIR.CompilationCache.File{root: Path.t()}

Functions

clear(cache)

@spec clear(t()) :: :ok | {:error, term()}

delete(cache, key)

@spec delete(t(), String.t()) :: :ok | {:error, term()}

get(cache, key)

@spec get(t(), String.t()) :: {:ok, map()} | :miss | {:error, term()}

new(root)

@spec new(Path.t()) :: t()

put(cache, key, value)

@spec put(t(), String.t(), map()) :: :ok | {:error, term()}