-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Badges aren't updating due to being cached on GitHub. #3323
Comments
So we need to add the max age back in? |
I believe I can set this on nginx just for the badges directory, and it should fix it. |
Did some testing. Does this look like it will fix it?
|
I still see the project in our project Here is what the github people say: github/markup#224 |
Believe this should be fixed. |
I can see it right now on my project: Badge is red but docs are right there in place. Last failed build close to two days old. Loading the image separately (per rst file) results in a green badge. The image appears to be cached by github per address bar if I open the image alone. Other badges are moving along just fine. |
Never mind I see there's a three days old fix. Hopefully it will kick in at some point. |
I believe we have this corrected. However, we're waiting for two things:
|
Will keep an eye on it thanks. |
+1 This is ongoing. Any fixes? |
We are still setting the cache headers, do you have more information about this issue? |
Add cache-control=no-cache as a parameter to your URL. per example: |
Details
Probably affects everyone that uses badges. At least on GitHub.
Our RTFD badge has been showing "failing" for days now, even though the docs build successfully.
Appears to be happening because GitHub has the image cached on its own domain.
Had a look at HTTP headers:
https://readthedocs.org/projects/lewis/badge/?version=latest
https://media.readthedocs.org/static/projects/badges/passing.svg
Seems likely that GitHub is ignoring the Cache-Control of the initial URL and respecting the Cache-Control of the redirect target... which means the badge will be cached for 604800 seconds == 7 days.
Related issues: #1612 and #3000.
Appears fixed in: 8c37801#diff-5d1a334650edab756ce4cdf8c531111e
Likely reintroduced by: 91f6c08#diff-5d1a334650edab756ce4cdf8c531111e
Note the latter commit was on Aug 17. Two new comments against #1612 since then complain that the problem still exists. Comments dated Aug 21 and Oct 31.
Expected Result
Badge should update when build status changes.
Actual Result
Badge doesn't update because it is cached.
The text was updated successfully, but these errors were encountered: