Methods
Public Instance methods
Declares that actions should be cached. See ActionController::Caching::Actions for details.
[ show source ]
# File actionpack/lib/action_controller/caching/actions.rb, line 58 58: def caches_action(*actions) 59: return unless cache_configured? 60: options = actions.extract_options! 61: filter_options = { :only => actions, :if => options.delete(:if), :unless => options.delete(:unless) } 62: 63: cache_filter = ActionCacheFilter.new(:layout => options.delete(:layout), :cache_path => options.delete(:cache_path), :store_options => options) 64: around_filter(filter_options) do |controller, action| 65: cache_filter.filter(controller, action) 66: end 67: end