Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

don't cache in development mode

  • Loading branch information...
commit 753d12a5050f2578f5cdd25aa5809f611e0f508f 1 parent 0ee719b
@jvdp authored
View
3  lib/asset_resource/framework/rails2.rb
@@ -5,6 +5,7 @@
Rails.configuration.middleware.use AssetResource::Middleware,
:base_path => Rails.root.join("public"),
:handlers => { :javascripts => "text/javascript",
- :stylesheets => "text/css" }
+ :stylesheets => "text/css" },
+ :asset_headers => RAILS_ENV == "development" && "Cache-Control:max-age=0, private, must-revalidate"
ActionView::Base.send :include, AssetResource::Helpers
View
3  lib/asset_resource/framework/rails3.rb
@@ -8,7 +8,8 @@ class AssetResource::Railtie < Rails::Railtie
config.app_middleware.use AssetResource::Middleware,
:base_path => Rails.root.join("public"),
:handlers => { :javascripts => "text/javascript",
- :stylesheets => "text/css" }
+ :stylesheets => "text/css" },
+ :asset_headers => Rails.env.development? && "Cache-Control:max-age=0, private, must-revalidate"
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.