4 ms·
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 t
by eat_veggies 6y ago
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/about-anonymized-image-urls#removing-an-image-from-camos-cache https://docs.github.com/en/github/authenticating-to-github/a...
[1] https://github.com/veggiedefender/typing/blob/0ed7c9c17970d6c1b2a7f16ec9acd20fb3bffd2b/handler.go#L86-L103 https://github.com/veggiedefender/typing/blob/0ed7c9c17970d6...