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

Add cache bust feature #1202

Open
am2222 opened this issue Mar 8, 2024 · 3 comments
Open

Add cache bust feature #1202

am2222 opened this issue Mar 8, 2024 · 3 comments

Comments

@am2222
Copy link

am2222 commented Mar 8, 2024

Hi,

I was wondering if there is any chance we can add cache bust feature to the tilejson. technically once we renew tiles in the server browsers still use the locally cached data. one workaround is to add a has of last-modified from tile metadata as a query parameter to the tilejson.tiles and it will make browser to invalidate their cache.

I need to read the source code more but I think we can add it here.
https://github.com/maptiler/tileserver-gl/blob/500a81e8b32aa83247ff3146a854eecf7059e491/src/serve_data.js#L210C5-L212C7

I can make a PR for this if that makes sense from your perspective!

@am2222
Copy link
Author

am2222 commented Jul 8, 2024

@acalcutt does it get merged if I make a PR for it? Thanks!

@acalcutt
Copy link
Collaborator

acalcutt commented Jul 8, 2024

You can submit a PR for review and we can see. I'm not really familiar with this so we would have to test and see if there are any comments before it got merged.

@am2222
Copy link
Author

am2222 commented Jul 9, 2024

@acalcutt Thanks! I just created a PR for it, please let me know what are your thoughts (#1307)

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