Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 3738

Show
Ignore:
Timestamp:
03/02/06 01:48:56 (3 years ago)
Author:
david
Message:

Added that page caching will only happen if the response code is less than 400 (closes #4033) [g.bucher@teti.ch]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r3701 r3738  
    11*SVN* 
     2 
     3* Added that page caching will only happen if the response code is less than 400 #4033 [g.bucher@teti.ch] 
    24 
    35* Add ActionController::IntegrationTest to allow high-level testing of the way the controllers and routes all work together [Jamis Buck] 
  • trunk/actionpack/lib/action_controller/caching.rb

    r3580 r3738  
    135135      private 
    136136        def caching_allowed 
    137           !@request.post? 
     137          !@request.post? && @response.headers['Status'] && @response.headers['Status'].to_i < 400 
    138138        end 
    139139    end