[Openstreetmap-dev] Re: [Openstreetmap] cache of editor applet background?

Erik Johansson erjohan at gmail.com
Mon Jan 23 22:56:51 GMT 2006

On 1/23/06, Tom Carden <tom at tom-carden.co.uk> wrote:

> Is there a web interface to squid's cache management?  If not, should we
> write one?  I know you can force-refresh a tile using a web browser, but I
> don't know if you can automatically trigger the same request using JS.
> Possibly it's just an HTTP header that you can write into an
> XmlHttpRequest or something?

Squids cache can be invalidated/purged with the squidclient command,
it is available in the squid source package  (or in debian by: apt-get
install squidclient). I've also seen a perl script called Cache
Purger, which works by allowing you to search for specific URLs that
you want to invalidate.

But, Instead we should solve the problem; dao.rb should have a
get_[node|gpxpoint|segment]_etag(bbx) method, that allows us to
compute an etag. This would allow us to send an ETag on the image we
want to send  and then parse "If-None-Match: ETAG-ETAG-ETAG1" type
headers that the client sends. If the ETag matches the current one we
can  send a header with a 304 response code to indicate that nothing
has changed.

I was trying to write a little bit between lectures, still lots
missing (and wiki is down);

To I'm not quite sure what you can base the etag on in ths OSM data.
But I used the modification date of my own data, just the number of
seconds from 1970.

1. date of the latest gpxpoint/node/segment that was inserted.
    select max(timestamp) from nodes where latitude > #{lat2}  and
latitude < #{lat1} and longitude > #{lon1} and longitude < #{lon2}

2. hash of all the sql data?

3. hash of the image?


More information about the dev mailing list