maplibre / maplibre-gl-js

MapLibre GL JS - Interactive vector tile maps in the browser
https://maplibre.org/maplibre-gl-js/docs/
Other
6.42k stars 691 forks source link

Missing cache control when reloading a vector tile #3309

Open HarelM opened 11 months ago

HarelM commented 11 months ago

I'm not sure this is an actual issue, but I have seen in the vector_tile_worker_source.ts code a place where the tile is reloaded, the data is used from previous load, but the cache control options are not passed back from the worker to the main code.

I'm opening this issue in order to explain what I saw in the code for future referece.

I'm not sure it's worth fixing as I'm not sure if the code can actually reach this place...

HarelM commented 7 months ago

The relevant line of code is here: https://github.com/maplibre/maplibre-gl-js/blob/2120a555e8992553c5bb30069d0697c41a622cca/src/source/vector_tile_worker_source.ts#L175 As can be seen, the above code path return the cache control, but this code path doesn't.