1

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 (memcached on heroku is expensive)

What is a good way to skip Rack::Cache for these requests?

levinalex
  • 5,889
  • 2
  • 34
  • 48

1 Answers1

0

This blog post helped me http://jackchu.com/blog/2011/09/20/rails-asset-pipeline-content-delivery-networks-and-rack-cache/

I turned rack cache off completely with:

config.middleware.delete Rack::Cache

He also has another suggestion to replace rack cache with rack static for assets only, which still leaves rack cache in place for other requests.

KMannGT
  • 11
  • 1