Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficulty to expose metatile as a HTTP response header? #332

Open
Firefishy opened this issue Sep 1, 2023 · 5 comments
Open

Difficulty to expose metatile as a HTTP response header? #332

Firefishy opened this issue Sep 1, 2023 · 5 comments

Comments

@Firefishy
Copy link
Member

Firefishy commented Sep 1, 2023

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?

@hummeltech
Copy link
Collaborator

hummeltech commented Sep 6, 2023

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.

@Firefishy
Copy link
Member Author

That looks very good, but the header specifically needs to be named Surrogate-Key:

@hummeltech
Copy link
Collaborator

Alright, I understand this a bit better, I updated the code, try it out now.

@Firefishy
Copy link
Member Author

Looks Great!

@hummeltech
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants