pkgx
pkgx copied to clipboard
Store etag So Downloads Use Cache
@kunalgoyal9 this one is a priority to get completed before launch please.
@kunalgoyal9 get this one done when you can please.
Sure, @Xercesblu3 Can I get more detail on this one please
Downloads should return the etag header, which you can pass back on subsequent queries to see if the response would be different or not.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
If we save this with useCache/useDownload downloads, we should be able to quickly know if our cache item is valid or not, rather than redownloading it every time. Useful for things like rust or llvm sources.
@jhheider right now we are using If-Modified-since from header to check for cache... Now should we include etag as well.. right?
I wonder if GitHub honors if-modified. Those should be redundant.
Thank you for helping explain @jhheider
GitHub does not provide modified-since for source tarballs for some reason. Hence this request. We already do If-Modified in useDownload