[OSM-dev] Tile caching

Thomas Walraet thomas at walraet.com
Wed Sep 20 12:49:14 BST 2006


Dean Earley a écrit :
> 
> Any and all thoughts welcome.

For server with limited power available, there is a caching technique 
that works quite well, based on 404 redirect.

The idea is to keep only Apache, drop Squid, and handle cache 
invalidation internally (the last part seems difficult with Squid).

Just point the slippy map directly to the cache folder. If the tile is 
available, it's served by Apache without any Ruby or other script 
language involved. If the tile is not available the Apache 404 redirect 
is configure to point to the script that generate the tile, put it on 
the cache folder and send it to the client.

To invalidate a tile in the cache, you only have to delete it.


If we implements something (quadtree...) to know which tiles are 
impacted by recent changes, this technique could be used to set up a 
cache with easy invalidation and very low resource consumption (if a 
tile is cached, it's only Apache serving a static file!)




More information about the dev mailing list