Skip to content

Add cache bust feature #1202

@am2222

Description

@am2222

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions