Interface: MapTileCacheConfig
Configuration options for map tile caching. Allows controlling how map tiles are cached in memory and persisted via service worker.
Example
Properties
enabled?
Enable tile caching When false, tiles are fetched directly without caching
Default
maxTiles?
Maximum number of tiles to keep in MapLibre’s memory cache Higher values use more memory but improve performance for panning/zooming
Default
persistToServiceWorker?
Enable service worker persistence for offline tile access When true, tiles are cached via the cached-tile:// protocol
Default
preloadAdjacentZooms?
Preload tiles for adjacent zoom levels Improves zoom transitions but increases initial load time and bandwidth
Default
ttlMs?
Time-to-live in milliseconds for cached tiles After this time, tiles will be re-fetched on next request
Default
Last updated on