# `ReqLLM.StreamResponse.MetadataHandle`
[🔗](https://github.com/agentjido/req_llm/blob/main/lib/req_llm/stream_response/metadata_handle.ex#L1)

Asynchronous metadata cache that allows multiple awaiters to share the same result.

The handle starts a background process that runs the supplied fetch fun exactly once.
Callers can await the metadata multiple times without causing repeated fetches or
task mailbox exhaustion. Call `stop/1` when the cached metadata is no longer needed.

# `t`

```elixir
@type t() :: pid()
```

# `await`

```elixir
@spec await(t(), timeout()) :: map()
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link((-&gt; map())) :: {:ok, t()} | {:error, term()}
```

# `stop`

```elixir
@spec stop(t()) :: :ok
```

Stops a metadata handle and any in-progress metadata collection.

This operation is idempotent and returns `:ok` when the handle has already stopped.

---

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