This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Increase Tile Cache Value

0

Hi,

I have my own OSM server in use, which I created according to the following instructions. https://switch2osm.org/manually-building-a-tile-server-18-04-lts/

Everything works fine, but I don't find a place where I can increase the value of the Tile caches. According to the HTTP Response Header the Cache for the Tiles are only Cached for about 5 Hours.

Response Header: Cache-Control: max-age=18065

At which point can I adjust this value so that the tiles are cached longer?

Thanks Hans

asked 04 Mar '19, 11:29

Tiblak1's gravatar image

Tiblak1
16112
accept rate: 0%


One Answer:

2

The mod_tile configuration offers a multitude of options to control caching duration: https://github.com/openstreetmap/mod_tile/blob/master/debian/tileserver_site.conf#L51-L111

Note that all this does not control how long a meta tile is cached on the server (meta tiles do not expire, ever) - it only controls how long the client is going to treat a response as up-to-date.

answered 04 Mar '19, 11:33

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .