geotiffjs / geotiff.js

geotiff.js is a small library to parse TIFF files for visualization or analysis. It is written in pure JavaScript, and is usable in both the browser and node.js applications.
https://geotiffjs.github.io/
MIT License
859 stars 179 forks source link

Cache fetch promise and clear on error #381

Open jcphill opened 1 year ago

jcphill commented 4 months ago

Please merge this small change. It eliminates redundant fetches by moving the fetch inside of the request, which is cached. If the fetch fails the request is removed from the cache so that the fetch will be retried if there is another attempt to load the tile.