[OSM-talk] Tile caching (osm startpage)

Michal Migurski mike at stamen.com
Sun Mar 7 02:25:02 GMT 2010


On Mar 5, 2010, at 11:34 AM, John Smith wrote:

> On 6 March 2010 01:24, Bernhard zwischenbrugger <bz at datenkueche.com> wrote:
>> Google Cache Time:
>> Cache-Control: public, max-age=22222222  //feels like one month (I
>> didn't calculate)
> 
> I'd say it's a bad idea to specify a cache time, instead there is
> other caching mechanisms to tell if a tile has changed:
> 
>> ETag: "d096ddafba32c0da609007e224530ccd"
> 
> This way if a tile never changes you never need to refresh.


For what it's worth, the current tile server does specify a cache time as well as an ETag.

% curl -sI "http://tile.openstreetmap.org/14/2627/6331.png"
	HTTP/1.1 200 OK
	Date: Sun, 07 Mar 2010 02:19:30 GMT
	Server: Apache/2.2.8 (Ubuntu)
	ETag: "93087c5713c17d9939cac9e341fdd14c"
	Content-Length: 26595
	Cache-Control: max-age=1036
	Expires: Sun, 07 Mar 2010 02:36:46 GMT
	Content-Type: image/png

1,000 sec. max age there is a little over 15 minutes, though when I repeat this request I get expiry times all over the place, from a few minutes to many hours. What currently decides on the cache expiration time?

The Phnom Penh issue all sounds like a job for a CDN like Akamai's or a caching proxy (i.e. squid-cache.org) closer to Cambodia. Bernhard, these are not difficult to set up for yourself if you are interested, and require little knowledge of the actual map.

-mike.

----------------------------------------------------------------
michal migurski- mike at stamen.com
                 415.558.1610







More information about the talk mailing list