A small tool that uses curl to PURGE the github cache for badges displayed in README.md files
Unfortunately github caches badges ( on a server called camo.githubusercontent.com ) quite agressively. This leads to badge data being out of date a lot of the time.
Theoretically if the src badge image correctly sets....
Cache-Control: no-cache, no-store
Expire: Mon, 01 Jan 1990 00:00:00 GMT
Last-Modified: Mon, 01 Jan 2999 00:00:00 GMT
and a unique to each request etag
Etag: $UUID
Everything should work just fine. However, many people find that not to be the case.
I found another possible workaround that calls for adding a dummy paramater to the URL of the badge. This may or may not work for all badge sources.
[tv-nightly-image]: https://jimtru1979.blob.core.windows.net/badges/DailyBuildStatus.svg?dummy=unused
[![Coverage Status](https://coveralls.io/repos/github/ledgersmb/LedgerSMB/badge.svg?branch=master)](https://coveralls.io/github/ledgersmb/LedgerSMB?branch=master&dummy=unused)
There is a large list of bugs open (and incorrectly closed) relating to this. The main issue is
- #224 - Aggressive image caching breaks image badges
Some of the others are.....
- #9 - GitHub Image Proxy breaking Nodei.co images in markdown
- #15 - Badges do not update with GitHubs caching
- #111 - can't find the URL for this one
- #116 - can't find the URL for this one
- #134 - Serve cached images upon request timeout
- #137 - Travis badges seem to be broken
- #218 - GitHub caching affecting my badge
- #220 - Set
Cache-Control
orExpires
on S3 assets - #257 - Badge caching
- #414 - Incorrect coverage badge
- #1970 - Build status image cached by GitHub
- #3122 - Code Coverage Status Badge is cached
- #3150 - Unix nightly badge is inaccurate
- #6040 - fix coveralls badge issue in README
- #17057 - Aggressive GitHub caching breaks Gitlab badge images.