maplibre-gl-js icon indicating copy to clipboard operation
maplibre-gl-js copied to clipboard

Cache control for tiles: max-age=0 is ignored

Open Schlepptop opened this issue 1 year ago • 0 comments
trafficstars

maplibre-gl-js version: 4.0.2

browser: Chrome

Steps to Trigger Behavior

  1. 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

Schlepptop avatar Mar 04 '24 21:03 Schlepptop