Skip to content
Browse files

ugh.

  • Loading branch information...
1 parent 255974e commit 22aab9ee9b959aba316e73648e6d370b4817f7ab @peburrows committed
Showing with 0 additions and 19 deletions.
  1. +0 −19 app/models/translate_response_cache.rb
View
19 app/models/translate_response_cache.rb
@@ -75,24 +75,5 @@ def page_cache_path(path)
cache_path
end
end
-
- # Reads a cached response from disk and updates a response object.
- def read_response(path, response, request)
- file_path = page_cache_path(path)
- if metadata = read_metadata(path)
- response.headers.merge!(metadata['headers'] || {})
- if client_has_cache?(metadata, request)
- # we need to see if this is really what we want to do. it causes issues with localization
- # since I'm being "smart" and sending the same url. ugh. I might be too "smart" for my
- # own good on this one
- # response.headers.merge!('Status' => '304 Not Modified')
- elsif use_x_sendfile
- response.headers.merge!('X-Sendfile' => "#{file_path}.data")
- else
- response.body = File.open("#{file_path}.data", "rb") {|f| f.read}
- end
- end
- response
- end
}
end

0 comments on commit 22aab9e

Please sign in to comment.
Something went wrong with that request. Please try again.