Badge Caching


Hello all,

It looks like the badge has some caching on it, meaning that the image that shows up when I open a repository on Github is not necessarily current. (Specifically, I’ve seen it claim a build is in-progress when it completed several minutes earlier.)

Wasn’t sure exactly where to bring this up, so I thought I’d post here. :slight_smile:



I think you’re mistaken, snapcraft badges seem to explicitly send a Cache-Control: public, max-age=0 header which means “dont cache this please”

Github actually caches images in the readme files, if you look at where the images are loaded from you will see they are coming from a github hosted domain where they proxy the image download. I think it’s for privacy reasons and to stop people tracking view counts of repositories.

Anyway, blame github :slight_smile:


I think that the servers are using a format for the Cache-Control header that the Github servers don’t understand; specifically in this issue: it is mentioned that the Cache-Control header should be specifically:

Cache-Control: no-cache

I’d be happy to file an issue for this somewhere, not sure which repo is used for the servers.



@Odd_Bloke @ijohnson I’ve created the issue for you

We’ll look at getting that fixed in the next couple of weeks for you


Thanks for filing that issue.


The issue has been fixed in and will be deployed in due course!