-
Notifications
You must be signed in to change notification settings - Fork 375
Should follow redirections but not cache against the redirected path #85
Comments
What headers are you setting? GitHub uses camo/fastly and respects caching headers. |
@atmos Here are the headers.
ETag is set too. My case is rather unique in the sense that the redirected URL changes, ie, for the same URL: The generated badge is updated every 5 minutes, via different redirection URL, instead of via content changes. |
Why not both? Perhaps the hash could compare the Content-Length, then depends passing cached or renew the hash for being a new image? |
Sorry but anything new? |
I'm working on a flexible badge service, Umbo, that allows user to update the badge with any values.
Example: https://github.com/uzyn/umbo-weather/blob/master/README.md
To not reinvent the wheel, I'm relying on the great service, shields.io, for badge generation (for example: https://img.shields.io/badge/Singapore%2C%20Singapore-27.47%C2%B0C-yellow.svg)
For the example at
umbo-weather
, there's a background process that updates the value every 5 minutes.The badge URL for Singapore weather is http://umbo.zynesis.com/singaporeio8gg0ok8ckwcck8.svg and it redirects to a different shields.io badge URL based on the value.
(Try going to http://umbo.zynesis.com/singaporeio8gg0ok8ckwcck8.svg in 5 minutes interval or so)
Camo, however, returns the final redirected URL and caches against that, of which the value never changes.
It would be great if Camo caches the original requesting URL instead. If not, what do you recommend that I should be doing for such service?
The text was updated successfully, but these errors were encountered: