def response_out_of_date?(api_response, cache_max_age, current_time=nil)
      if api_response.nil?
        @client.log(:verbose) { "ApiOperatorCached: Response not found in cache" }
        return true
      end
      if header_invalid?(api_response.headers)
        @client.log(:verbose) { "ApiOperatorCached: Ignoring cached response - invalid cache-control header" }
        return true
      end
      (cache_expired?(api_response.headers, cache_max_age, current_time)).tap do |expired|
        @client.log(:verbose) { "ApiOperatorCached: Cache response out of date (max age #{cache_max_age})" } if expired
      end
    end
def response_out_of_date?(api_response, cache_max_age, current_time=nil)
      if api_response.nil?
        @client.log(:verbose) { "ApiOperatorCached: Response not found in cache" }
        return true
      end
      if header_invalid?(api_response.headers)
        @client.log(:verbose) { "ApiOperatorCached: Ignoring cached response - invalid cache-control header" }
        return true
      end
      (cache_expired?(api_response.headers, cache_max_age, current_time)).tap do |expired|
        @client.log(:verbose) { "ApiOperatorCached: Cache response out of date (max age #{cache_max_age})" } if expired
      end
    end
=begin
    def response_out_of_date?(api_response, current_time=nil)
      (api_response.nil? || header_invalid?(api_response.headers) || cache_expired?(api_response.headers, current_time)).tap do |expired|
        @client.log(:verbose) { "ApiOperatorCached: Cache response out of date" if expired }
      end
    end
=end