From e56bd3a121d1b9ae1d89a335cc39ff9aef36789e Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 19 Dec 2006 20:25:52 +0000 Subject: Only cache GET requests with a 200 OK response. Closes #6514, #6743. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5755 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/caching.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/caching.rb') diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index 28dc45139a..c7f3e95617 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -135,7 +135,7 @@ module ActionController #:nodoc: private def caching_allowed - !request.post? && response.headers['Status'] && response.headers['Status'].to_i < 400 + request.get? && response.headers['Status'].to_i == 200 end end -- cgit v1.2.3