[OSM-dev] Tile caching

Robert Hart Robert.Hart at BuroHappold.com
Wed Sep 20 13:10:45 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.

Not sure if it's been suggested before, but it would make sense (to me) to
preseed the cache. In my experience it is only tiles with more than a
certain (limited) number of roads that cause problems. It should be pretty
easy to identify which tiles they are, and generate them offline, or on the
server when load is low. I imagine they are a relatively small subset of all
possible tiles, and by generating them in batch, and without the need to do
it all before timing out, more efficient....

Rob



This message has been scanned for viruses by MailControl - www.mailcontrol.com




More information about the dev mailing list