Module: ActionController::Caching::Actions::ClassMethods
- Defined in:
- lib/action_controller/caching/actions.rb
Instance Method Summary collapse
-
#caches_action(*actions) ⇒ Object
Declares that
actions
should be cached.
Instance Method Details
#caches_action(*actions) ⇒ Object
Declares that actions
should be cached. See ActionController::Caching::Actions for details.
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/action_controller/caching/actions.rb', line 58 def caches_action(*actions) return unless cache_configured? = actions. = { :only => actions, :if => .delete(:if), :unless => .delete(:unless) } cache_filter = ActionCacheFilter.new(:layout => .delete(:layout), :cache_path => .delete(:cache_path), :store_options => ) around_filter() do |controller, action| cache_filter.filter(controller, action) end end |