# `Ussd.Cache.ETS`
[🔗](https://github.com/spesohq/ussd/blob/main/lib/ussd/cache/ets.ex#L1)

Default `Ussd.Cache` implementation: a supervised GenServer owning a public, named
ETS table.

Unlike the table the old `Ussd.Record` used directly, entries here carry a real
expiry: reads lazily drop expired entries, and a periodic sweep (every
`config :ussd, :cache_sweep_interval, :timer.minutes(1)`, default one minute)
reclaims sessions nobody ever explicitly closed - the previous implementation kept
every session in memory forever unless the flow ended with an explicit "prompt"
action.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts the cache's supervised GenServer. Accepts `:sweep_interval` (milliseconds)
to override `config :ussd, :cache_sweep_interval` for this one process - normally
you don't call this yourself; Ussd.Application starts it as part of the app's
supervision tree.

---

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