mapbox / mapbox/mapbox-gl-js

Refresh expired geojson sources

Open
#8,240 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature :green_apple:
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.