ruby on rails - rest-client not caching responses from Heroku -


We are running our Ruby on Rails (4.0) Application (O Call: 'Carva') on Heroko, URL Controller's response: We are finishing http caching:

expires_in XXX.seconds ,: public => true

Now, try to run the console on the following code: (You need Gems / Cash 'RestClient.enable Rack :: Cache, Metastore =>:'

 . 'File: / tmp / cache / meta ',: Unitstore = & gt;' file: / tmp / Cache / body 'RestClient.get (' http://www.carwow.co.uk '); zero RestClient.get (' http://www.carwow.co.uk '); zero RestClient.get (' https : //api.github.com/users/octocat/orgs'); zero RestClient.get ('https://api.github.com/users/octocat/orgs'); of zero  

The second request will not use any cached version and it will display the following: Cache: [GET] Miss, Store

The second request will display the cache for GITUB: [GET] Fresh

When we use the 'carwa' app locally in Dev and production mode (U On the Hiroko, like the Nicorn Server), the second request displays the cache: [GET] refreshed

We began to believe that the way we set up HTTP headers, but we did not solve the problem There can be something wrong in it. Has anyone ever experienced this?

Kind regards

We have decided to use this option by using the client If you have configured the rack cache:

  ignore_headers: ['x-content-digest']  

There may be more information on the reasons for correcting it Found on this post:


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -