def get(path, headers = {})
      cached_response = fetch_cached_response(path)
      if cached_response
        headers = headers.merge 'If-None-Match' => cached_response['Etag']
      end
      response = super(path, headers)
      case response
      when Net::HTTPNotModified then cached_response
      else
        cache_response(path, response)
        response
      end
    end
def get(path, headers = {})
      cached_response = fetch_cached_response(path)
      if cached_response
        headers = headers.merge 'If-None-Match' => cached_response['Etag']
      end
      response = super(path, headers)
      case response
      when Net::HTTPNotModified then cached_response
      else
        cache_response(path, response)
        response
      end
    end
Wrap RestClient#get to provide HTTP caching.

 New requests are stored in a cache if they have an +Etag+ header. On
 subsequent requests to the same resource, a +If-None-Match+ header is sent
 along, using the original Etag value. The server can then indicate that
 nothing has changed, which will trigger this decorator to return the
 cached response -- rather than downloading a whole new copy of the same
 data.