[OSM-dev] mod_tile default expiry
Jon Burgess
jburgess777 at gmail.com
Tue Oct 5 18:30:23 BST 2010
On Tue, 2010-10-05 at 14:11 +0200, Peter Körner wrote:
> Hi
>
> I'm unsure about the expiry code in mod_tile.
>
> As far as I see mod_tile does treads a tile as old in two conditions:
> - the tile is older then the planet-import-complete file
> - the tile has not been changed for PLANET_INTERVAL days (defaults to
> 7 days)
>
> So even if I'm not using render_expired or expire.py or another expiry
> method, all regular accessed tiles a re-rendered each 7 days?
The code which uses PLANET_INTERVAL is calculating the expiry headers to
send back in the HTTP response. This means that when a tile is older
than the PLANET_INTERVAL then the HTTP client might decide to discard it
or at least come back and check whether it is still fresh via a
conditional GET request.
This does not directly cause renderd to render the tile again. If the
tile still exists and is newer than the PLANET_TIMESTAMP then mod_tile
will either return the existing tile or send a '304 not modified'
response without even talking to the render daemon.
Jon
More information about the dev
mailing list