maplibre-gl-js
maplibre-gl-js copied to clipboard
Cache control for tiles: max-age=0 is ignored
trafficstars
maplibre-gl-js version: 4.0.2
browser: Chrome
Steps to Trigger Behavior
- Create a custom scheme that sets the cacheControl to "max-age=0" for every tile.
Link to Demonstration
No
Expected Behavior
Tiles should get an expirationTime of 0
Actual Behavior
Tiles should get an expirationTime of null
I believe this is due to the type-coercion at https://github.com/maplibre/maplibre-gl-js/blob/ee0450cbaa12a6071f3f74381cceb18ca0569779/src/source/tile.ts#L364