Configurable tile cache size
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Recently a tilecache has been added to Mapbox GL JS using Cache API (https://github.com/mapbox/mapbox-gl-js/pull/8363)
The size seems to be set at 50MB, but a larger cache would improve performance on machines with more storage available.
https://github.com/mapbox/mapbox-gl-js/blob/30db469efec189f100efa8ca15416f2127c267a0/src/util/tile_request_cache.js#L9
Can this be piped through to a property in mapboxgl.Map like:
new mapboxgl.Map({ cacheSize: 100*1024*1024 }) ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/util/tile_request_cache.js at the referenced size setting and trace how the tile cache is created when new mapboxgl.Map is initialized. Add support for the proposed cacheSize option and verify that the configured value controls the cache limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, performance
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100