# `StaticMaps.TileCache.ETS`
[🔗](https://gitlab.com/tristanperalta/staticmaps/blob/v0.1.0/lib/static_maps/tile_cache/ets.ex#L1)

The default tile cache: an ETS table in memory, lost on restart.

The cache holds at most `:max_bytes` of tile bodies, 64 MB by default. When a put takes
it over the limit, the least recently used tiles are evicted until it is back under
90% of the limit, so eviction does not run again on every put.

    config :staticmaps, :tile_cache, max_bytes: 128 * 1024 * 1024

# `bytes`

The total size of the tile bodies held, in bytes.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `get`

Like `get/1`, for the cache started as `name`.

# `put`

Like `put/2`, for the cache started as `name`.

# `start_link`

Starts the cache.

Options: `:name` (default `StaticMaps.TileCache.ETS`) and `:max_bytes`.

---

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