For most use cases, like for CI badges, setting cache-control and etag headers will suffice, but GitHub still caches it (just for a shorter time? I don't know the specifics). Luckily, you can request that they purge their cache for a specific file [0] so I've got a goroutine that calls it once per second [1]
[0] https://docs.github.com/en/github/authenticating-to-github/a...
[1] https://github.com/veggiedefender/typing/blob/0ed7c9c17970d6...