# `WorkflowStem.Cache`
[🔗](https://github.com/fosferon/workflow_stem/blob/main/lib/workflow_stem/cache.ex#L1)

ETS-backed cache for compiled workflow IR.

Keyed by `{tenant_id, workflow_handle, artifact_hash}` to enforce tenant isolation.

This is intentionally simple: hot-reload is achieved by invalidation/eviction,
not code loading or module generation.

# `ensure_started`

```elixir
@spec ensure_started() :: :ok
```

# `get`

```elixir
@spec get(
  {WorkflowStem.Types.tenant_id(), WorkflowStem.Types.workflow_handle(),
   WorkflowStem.Types.artifact_hash()}
) :: {:ok, WorkflowStem.Types.ir()} | :miss
```

# `invalidate`

```elixir
@spec invalidate(WorkflowStem.Types.tenant_id(), WorkflowStem.Types.workflow_handle()) ::
  non_neg_integer()
```

# `put`

```elixir
@spec put(
  {WorkflowStem.Types.tenant_id(), WorkflowStem.Types.workflow_handle(),
   WorkflowStem.Types.artifact_hash()},
  WorkflowStem.Types.ir()
) :: :ok
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
