Since we need to display maps in a current project, I sat down and wrote a tile cache server in Erlang. It sits between your application and an OpenStreetMap tile server, caching tiles locally to reduce traffic and save resources on the upstream server.

Start it with Docker:

docker run --rm -p 8008:8008 ratopi/tile-cache

Or with rebar3:

rebar3 shell

Source code on GitHub.