# `LLMProxy.Cache.Runtime`
[🔗](https://github.com/elixir-vibe/llm_proxy/blob/v0.3.1/lib/llm_proxy/cache/runtime.ex#L1)

Runtime dispatcher for optional cache adapters, cache-key generation, and cache writes.

# `enabled?`

```elixir
@spec enabled?(LLMProxy.Protocol.Request.t(), LLMProxy.Cache.context()) :: boolean()
```

# `get`

```elixir
@spec get(String.t(), LLMProxy.Cache.context()) ::
  {:hit, LLMProxy.Response.t()} | :miss
```

# `key`

```elixir
@spec key(LLMProxy.Protocol.Request.t(), [LLMProxy.Providers.Attempt.t()]) ::
  String.t()
```

# `policy`

```elixir
@spec policy(LLMProxy.Protocol.Request.t(), LLMProxy.Cache.context()) ::
  LLMProxy.Cache.Policy.t()
```

# `put`

```elixir
@spec put(
  String.t(),
  LLMProxy.Protocol.Request.t(),
  LLMProxy.Response.t(),
  LLMProxy.Cache.context()
) ::
  :ok
```

---

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