# `Linocut.Cache`
[🔗](https://github.com/jaman/cauldron/blob/v0.1.3/linocut/lib/linocut/cache.ex#L1)

Rasters rendered once and kept on disk, under `$XDG_CACHE_HOME/linocut` or
`~/.cache/linocut`.

    headings = Linocut.Cache.fetch("ship/headings", "2", fn -> Linocut.headings(points, 64, size: {16, 16}, fill: :white) end)

`key` may contain slashes; `fingerprint` is any string that changes when the render
should. The render function may return one raster or a list of them; either comes back
the same shape, with dense pixel buffers.

# `fetch`

```elixir
@spec fetch(String.t(), String.t(), (-&gt; FrenchCurve.Raster.t()
                                  | [FrenchCurve.Raster.t()])) ::
  FrenchCurve.Raster.t() | [FrenchCurve.Raster.t()]
```

The stored rasters for `key` and `fingerprint`, rendering and storing them when absent.

# `path`

```elixir
@spec path(String.t(), String.t()) :: Path.t()
```

Where `key` at `fingerprint` is stored.

---

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