4 ms·
Doesn't GitHub cache fetched images? Any tricks required to get GitHub to refresh the image?
by uzyn 6y ago
Doesn't GitHub cache fetched images?
Any tricks required to get GitHub to refresh the image?
- eat_veggies 6y agoFor 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...