2014-01-14 16 views
1

我試圖在加星標的回購站上設置緩存,但我無法獲得faraday_http_cache,也無法使用faraday_middleway的響應緩存來使用Octokit。使用法拉第中間件緩存來自GitHub API的響應

Octokit.middleware = Faraday::Builder.new do |builder| 
    builder.use Faraday::HttpCache # won't cache the private responses 
    builder.use FaradayMiddleware:Caching @cache # fails to cache silently when using Marshal for caching 
    builder.use Octokit::Response::RaiseError 
    builder.adapter Faraday.default_adapter 
    # builder.response :logger 
end 

不確定在哪裏轉到緩存加星標的回購。

回答

0

您可以通過shared_cache: false,所以製作線builder.use :http_cache, shared_cache: false

相關問題