Skip to content

Commit

Permalink
Add to documentation that action caching does
Browse files Browse the repository at this point in the history
handle HTTP_ACCEPT attribute properly and might
provide wrong result. Use params[:format] to
avoid this issue.
  • Loading branch information
Neeraj Singh committed Dec 6, 2010
1 parent 48386d2 commit 3ac844d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions actionpack/lib/action_controller/caching/actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ module Caching
# 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

Expand Down

0 comments on commit 3ac844d

Please sign in to comment.