instance method
caches_action
Ruby on Rails 3.2.22.5
Since v2.2.3 Last seen in v3.2.22.5Signature
caches_action(*actions)
Declares that actions should be cached. See ActionController::Caching::Actions for details.
Parameters
-
actionsrest
Source
# File actionpack/lib/action_controller/caching/actions.rb, line 93
def caches_action(*actions)
return unless cache_configured?
options = actions.extract_options!
options[:layout] = true unless options.key?(:layout)
filter_options = options.extract!(:if, :unless).merge(:only => actions)
cache_options = options.extract!(:layout, :cache_path).merge(:store_options => options)
around_filter ActionCacheFilter.new(cache_options), filter_options
end
Defined in actionpack/lib/action_controller/caching/actions.rb line 93
· View on GitHub
· Improve this page
· Find usages on GitHub