# `MingaEditor.Renderer.HighlightCache`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/renderer/highlight_cache.ex#L1)

Retains composed syntax and semantic presentation by source revision.

Preparation visits each displayed buffer once, independent of its span count on a cache hit. Raw frame sources remain immutable. Hidden buffers retain their composition until their sources are removed; frontend acknowledgement and reset do not affect this derived state.

# `highlights`

```elixir
@type highlights() :: %{required(pid()) =&gt; MingaEditor.UI.Highlight.t() | nil}
```

# `t`

```elixir
@type t() :: %MingaEditor.Renderer.HighlightCache{
  entries: %{required(pid()) =&gt; entry()}
}
```

# `drop_buffer`

```elixir
@spec drop_buffer(t(), pid()) :: t()
```

# `new`

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

# `prepare`

```elixir
@spec prepare(t(), MingaEditor.RenderPipeline.Intent.t()) :: {t(), highlights()}
```

Composes only displayed buffers whose source revisions changed.

# `retain`

```elixir
@spec retain(t(), MingaEditor.RenderPipeline.Intent.t()) :: t()
```

Discards outdated compositions without evaluating their replacement.

---

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