Added that page caching will only happen if the response code is less than 400...

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

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3738 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 f62b8af6
*SVN*
* Added that page caching will only happen if the response code is less than 400 #4033 [g.bucher@teti.ch]
* Add ActionController::IntegrationTest to allow high-level testing of the way the controllers and routes all work together [Jamis Buck]
* Added support to AssetTagHelper#javascript_include_tag for having :defaults appear anywhere in the list, so you can now make one call ala javascript_include_tag(:defaults, "my_scripts") or javascript_include_tag("my_scripts", :defaults) depending on how you want the load order #3506 [Bob Silva]
......
......@@ -134,7 +134,7 @@ def cache_page(content = nil, options = {})
private
def caching_allowed
!@request.post?
!@request.post? && @response.headers['Status'] && @response.headers['Status'].to_i < 400
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册