Is there a Ruby http client library where responses are automatically cached by ETag and the If-Non-Match header applied to requests on previously used URLs?
You might want to check the list of "Ruby HTTP clients features" (archived version from January 2015) for a complete overview.
Take a look at Faraday-HTTP-Cache.
rufus-jig supports conditional GET.
来源:https://stackoverflow.com/questions/6104922/is-there-a-ruby-http-client-library-with-a-response-cache