aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-12-06 16:38:47 -0500
committerNeeraj Singh <neerajdotname@gmail.com>2010-12-06 16:38:47 -0500
commit3ac844deec6070f35634acca0ae9007280b13e5d (patch)
tree4daee5ea1589d87b1da1f1d9a97cda752ee92bb5 /actionpack
parent48386d245bc169d3a36e5f305927bd968b108fea (diff)
downloadrails-3ac844deec6070f35634acca0ae9007280b13e5d.tar.gz
rails-3ac844deec6070f35634acca0ae9007280b13e5d.tar.bz2
rails-3ac844deec6070f35634acca0ae9007280b13e5d.zip
Add to documentation that action caching does
handle HTTP_ACCEPT attribute properly and might provide wrong result. Use params[:format] to avoid this issue.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/caching/actions.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/caching/actions.rb b/actionpack/lib/action_controller/caching/actions.rb
index d69d96b974..cb79e51dbf 100644
--- a/actionpack/lib/action_controller/caching/actions.rb
+++ b/actionpack/lib/action_controller/caching/actions.rb
@@ -71,6 +71,11 @@ module ActionController #:nodoc:
# If you pass :layout => false, it will only cache your action
# content. It is useful when your layout has dynamic information.
#
+ # Note: If action caching is being performed for different MIME types
+ # and those MIME types are being determined by HTTP_ACCEPT header atttribute
+ # and noth using params[:format] then both the cached data and the content-type
+ # of the response could be wrong. The safest way to use action caching is to
+ # pass non-html attribute as params[:format] .
module Actions
extend ActiveSupport::Concern