Github's proxy[1] respects Cache-Control headers, so it will just pass through since we use Etags and Cache-Control: no-cache.
Edit: Would it not be possible/better to just serve the SVG image direct from nginx? There is a LUA plugin, or even some direct redis stuff you could use.
edit: and regarding lua or nginx redis2, yes you could certainly do that. I happen to like the asynchronous nature of incrementing hit counters outside of the request cycle and just using nginx to serve the static badge files. But yeah there are a bunch of ways to do this.