Questions tagged [rack-cache]
19 questions
1
vote
1 answer
Problematic caching with rack cache
I am trying to cache a response from a server locally per example shown here.
#!/usr/bin/env ruby
require 'restclient/components'
require 'rack/cache'
RestClient.enable Rack::Cache,
:metastore => 'file:/tmp/cache/meta',
…

bioffe
- 6,283
- 3
- 50
- 65
1
vote
2 answers
HTTP cache with Rails + Rack::Cache not invalidating
My Rails 3 app generates pages that will change for a specified period of time and then be static (no changes) for the rest of their lifetime (think: sports scoreboard)
This seems like the perfect opportunity for full page caching, so I opted for…

Kohanz
- 1,510
- 16
- 35
1
vote
1 answer
Bypass Rack::Cache for requests coming from a CDN
I have a Rails 3.2 app, deployed to heroku. I use caching with Rack::Cache and Amazon CloudFront.
For Requests that are served via CloudFront (assets, mostly), the caching layer with Rack::Cache is redundant and I'd rather not use it there…

levinalex
- 5,889
- 2
- 34
- 48
0
votes
1 answer
Rails: cache with substitutes?
I have a partial I am caching, but one part of it is dynamic:
- cache @product do
.product
#.....
.price = format_money(@product.money)
And would like to turn it into something like this:
- cache_subst @product, {price:…

hakunin
- 4,041
- 6
- 40
- 57