# `ExResilience.Cache.EtsBackend`
[🔗](https://github.com/joshrotenberg/ex_resilience/blob/v0.4.0/lib/ex_resilience/cache/ets_backend.ex#L1)

Built-in ETS-based cache backend with TTL support.

Stores entries as `{key, value, expiry_time | nil}` in a named ETS table.
Expired entries are lazily evicted on read and periodically swept by the
owning GenServer.

## Options

  * `:table_name` -- atom name for the ETS table. Required.
  * `:sweep_interval` -- interval in ms between periodic sweeps.
    Default: `60_000`.

# `sweep`

```elixir
@spec sweep(map()) :: map()
```

Removes all expired entries from the ETS table.

Called by the owning GenServer on each sweep tick.

---

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