# `Flicker.RecentValues.Ets`
[🔗](https://github.com/team-alembic/flicker/blob/v0.1.0/lib/flicker/recent_values/ets.ex#L1)

A **dev/test-only** in-memory `Flicker.RecentValues` store
([Spec 022](https://github.com/team-alembic/flicker/blob/main/docs/specs/spec-022-recently-used-values.md)).

Not durable, not shared across nodes, and gone on restart. It exists so the
playground can demonstrate the `Recent` group and so tests have a real store
to drive, **not** as something to point a production app at — see
`Flicker.RecentValues` for why Flicker deliberately owns no persistence.

## Usage

    Flicker.RecentValues.Ets.start()

    <Flicker.search
      recent_values={Flicker.RecentValues.Ets.config()}
      ...
    />

Entries are keyed by `{scope, facet_key, value}`, where `scope` is derived
from the `:actor` in opts — so two actors in the same dev session don't see
each other's history, mirroring what a real host's per-user storage would do.

# `clear`

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

Clears everything. Test support.

# `config`

```elixir
@spec config() :: %{load: function(), record: function()}
```

The `recent_values` config map to hand to a component.

# `load`

```elixir
@spec load(atom(), keyword()) :: [Flicker.RecentValues.usage()]
```

Every recorded usage for `facet_key` in the caller's scope, as
`{value, used_at, count}` triples.

Returns facts, not an opinion — `Flicker.RecentValues.rank/2` does the
ordering, so ranking stays one testable function rather than something each
store reimplements.

# `record`

```elixir
@spec record(atom(), term(), keyword()) :: :ok
```

Records one use of `value`, bumping its count and its timestamp.

# `start`

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

Creates the backing table if it doesn't exist. Idempotent.

---

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