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
Summary
Functions
The total size of the tile bodies held, in bytes.
Returns a specification to start this module under a supervisor.
Like get/1, for the cache started as name.
Like put/2, for the cache started as name.
Starts the cache.
Functions
The total size of the tile bodies held, in bytes.
Returns a specification to start this module under a supervisor.
See Supervisor.
Like get/1, for the cache started as name.
Like put/2, for the cache started as name.
Starts the cache.
Options: :name (default StaticMaps.TileCache.ETS) and :max_bytes.