Difficulty to expose metatile as a HTTP response header?
Firefishy opened this issue · 5 comments
I am looking at improving caching and purging for tile.openstreetmap.org see: openstreetmap/operations#947
How much effort would it be to expose the source metatile in a HTTP response header?
eg:
Surrogate-Key: meta_z_x_y
The format of z_x_y
isn't important. Any logical format is ok.
Would there be a performance impact?
Hello @Firefishy, it's not very difficult, here's a very basic example of what could be done to satisfy your request:
master...hummeltech:mod_tile:MetaTileFileNameInHTTPHeader
There is certainly a lot of room for improvement, I.E. it might also be nice to have it be optional via a configuration entry.
That looks very good, but the header specifically needs to be named Surrogate-Key:
Alright, I understand this a bit better, I updated the code, try it out now.
Looks Great!
Hello @Firefishy, Let me know if this has been found to be useful in any deployments, and if so, whether or not we should open up a pull request (including customizability via httpd.conf
option(s)) to get this functionality supported in a release.