# `TruelayerClient.Auth.MemoryStore`
[🔗](https://github.com/iamkanishka/truelayer_client/blob/v1.0.0/lib/truelayer_client/auth/memory_store.ex#L1)

Default in-memory token store backed by ETS, supervised by a GenServer.

Tokens are keyed by `{store_id, token_type}`, where each `TruelayerClient`
instance receives a unique `store_id` (`make_ref/0`), providing complete
isolation between multiple clients in the same node.

## Characteristics

  * O(1) reads via ETS with `read_concurrency: true`
  * Atomic `insert_new` for race-free concurrent writes
  * Tokens survive process crashes (ETS table is owned by the GenServer,
    not the calling process)
  * Data is lost on node restart — use a Redis-backed store for persistence

Started automatically by `TruelayerClient.Application`.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

---

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