Refresh expired geojson sources
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Motivation
We need to consume external geojson sources that have Expires and Cache-Control headers correctly set. When the sources expire, it is desirable that Mapbox automatically refreshes it, the same way it has done for tiles since 0.32.0 (Jan 26, 2017).
https://docs.mapbox.com/mapbox-gl-js/style-spec/#sources-geojson
Design Alternatives
Require users to write their own code to explicitly refresh the sources regularly. But this would require a way for users to access the cache headers.
Design
Respect the cache headers
Mock-Up
N/A
Concepts
N/A - It should just work under the hood.
Implementation
No idea
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 by tracing how external GeoJSON sources are loaded and how tile requests already handle Expires and Cache-Control headers. Compare that path with GeoJSON source behavior; done means expired sources automatically refresh according to their cache headers without requiring user-written refresh code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100