diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2010-12-06 16:38:47 -0500 |
---|---|---|
committer | Neeraj Singh <neerajdotname@gmail.com> | 2010-12-06 16:38:47 -0500 |
commit | 3ac844deec6070f35634acca0ae9007280b13e5d (patch) | |
tree | 4daee5ea1589d87b1da1f1d9a97cda752ee92bb5 /actionpack/lib | |
parent | 48386d245bc169d3a36e5f305927bd968b108fea (diff) | |
download | rails-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/lib')
-rw-r--r-- | actionpack/lib/action_controller/caching/actions.rb | 5 |
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 |