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

Ticket #6514: dont_cache_redirects.diff

File dont_cache_redirects.diff, 430 bytes (added by RSL, 2 years ago)

Updated again to cache only HTTP GET requests

  • caching.rb

    old new  
    135135 
    136136      private 
    137137        def caching_allowed 
    138           !request.post? && response.headers['Status'] && response.headers['Status'].to_i < 400 
     138          request.get? && response.headers['Status'] && response.headers['Status'].to_i == 200 
    139139        end 
    140140    end 
    141141