Browse files

Only perform http cache if AC::Base.perform_caching is true.

  • Loading branch information...
1 parent cc450f4 commit e35f9ce94ffcc266697739b21f580a6d515764dd @josevalim josevalim committed Mar 2, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/responders/http_cache_responder.rb
View
3 lib/responders/http_cache_responder.rb
@@ -33,7 +33,8 @@ def do_http_cache!
end
def do_http_cache?
- get? && @http_cache != false && !new_record? && controller.response.last_modified.nil?
+ get? && @http_cache != false && ActionController::Base.perform_caching &&
+ !new_record? && controller.response.last_modified.nil?
end
def new_record?

0 comments on commit e35f9ce

Please sign in to comment.