# `LlmComposer.Cache.Behaviour`
[🔗](https://github.com/doofinder/llm_composer/blob/master/lib/llm_composer/cache/behaviour.ex#L1)

Cache behaviour to use other implementations for cache mod.

# `delete`

```elixir
@callback delete(key :: term()) :: :ok
```

Deletes a key from the cache.
Returns `:ok`.

# `get`

```elixir
@callback get(key :: term()) :: {:ok, term()} | :miss
```

Retrieves a value from the cache by key.
Returns `{:ok, value}` if found and not expired, `:miss` otherwise.

# `put`

```elixir
@callback put(key :: term(), value :: term(), ttl_seconds :: non_neg_integer()) :: :ok
```

Stores a value in the cache with the given key and TTL in seconds.
Returns `:ok`.

---

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