visgl / deck.gl

WebGL2 powered visualization framework
https://deck.gl
MIT License
12.06k stars 2.08k forks source link

[Bug] Disabling the cache for TileLayers #9155

Closed sraimund closed 2 days ago

sraimund commented 5 days ago

Description

It's not possible to set maxCacheSize or maxCacheByteSize to 0 to disable the cache for TileLayers.

Flavors

Expected Behavior

No response

Steps to Reproduce

The nullish coalescing operator ?? can be used instead of || to allow zeros but disallow null/undefined values:
https://github.com/visgl/deck.gl/blob/c20af822935a8acbe1d2998cb5b22fb14840fcb8/modules/geo-layers/src/tileset-2d/tileset-2d.ts#L471C1-L475C64

Environment

Framework version: deck.gl@9.0.29

Logs

No response

ibgreen commented 5 days ago

@sraimund Thanks for reporting. Since you seem to have a very localized change in mind that should be easy for maintainers to approve, would you consider making a PR for the fix?

@belom88