# `GEPA.EvaluationCache`
[🔗](https://github.com/nshkrdotcom/gepa_ex/blob/v0.3.0/lib/gepa/evaluation_cache.ex#L1)

Cache for validation evaluations keyed by candidate content and example id.

GEPA treats cached entries as opaque task outputs plus score metadata. A cache
hit avoids re-running the adapter and contributes zero new metric calls.

# `candidate`

```elixir
@type candidate() :: %{required(String.t()) =&gt; String.t()}
```

# `data_id`

```elixir
@type data_id() :: term()
```

# `key`

```elixir
@type key() :: {String.t(), data_id()}
```

# `t`

```elixir
@type t() :: %GEPA.EvaluationCache{
  entries: %{required(key()) =&gt; GEPA.EvaluationCache.Entry.t()}
}
```

# `candidate_hash`

```elixir
@spec candidate_hash(candidate()) :: String.t()
```

Deterministic hash for candidate maps.

# `get`

```elixir
@spec get(t(), candidate(), data_id()) ::
  {:ok, GEPA.EvaluationCache.Entry.t()} | :miss
```

Fetch one cached evaluation.

# `get_batch`

```elixir
@spec get_batch(t(), candidate(), [data_id()]) ::
  {%{required(data_id()) =&gt; GEPA.EvaluationCache.Entry.t()}, [data_id()]}
```

Split ids into cached entries and uncached ids.

The uncached list preserves the caller's requested order.

# `new`

```elixir
@spec new() :: t()
```

Create an empty evaluation cache.

# `put`

```elixir
@spec put(
  t(),
  candidate(),
  data_id(),
  term(),
  float(),
  %{required(String.t()) =&gt; float()} | nil
) :: t()
```

Store one cached evaluation.

# `put_batch`

```elixir
@spec put_batch(
  t(),
  candidate(),
  [data_id()],
  [term()],
  [float()],
  [%{required(String.t()) =&gt; float()}] | nil
) :: t()
```

Store a batch of evaluation results.

---

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