badges / badges/shields

Respect cache header from custom endpoints

Open
#6,310 4 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
27.2k
Forks
5.6k
Avg merge
1d 8h
Merged PRs (30d)
46

Description

I might have overlooked something, but it seems like `Cache-Control` headers are not properly respected for requests to custom endpoints, are they?

Requesting a badge twice using a custom endpoint, which returns `Cache-Control: no-cache`, resulted in only one request to that certain endpoint in my experiments.

How is does Shields implement caching in general? What resource are cached and for how long?

Contributor guide

Open the contributing guide

Research direction

Reproduce the custom-endpoint request twice with a Cache-Control: no-cache response, then trace the repository's general caching implementation and the custom-endpoint path. Done means the observed request behavior matches the header semantics and the applicable cached resources and durations are documented or otherwise verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
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.