Methods

Class/Module Index [+]

Quicksearch

ActionController::Caching::Actions::ClassMethods

Public Instance Methods

caches_action(*actions) click to toggle source

Declares that actions should be cached. See ActionController::Caching::Actions for details.

# File lib/action_controller/caching/actions.rb, line 58
def caches_action(*actions)
  return unless cache_configured?
  options = actions.extract_options!
  filter_options = { :only => actions, :if => options.delete(:if), :unless => options.delete(:unless) }

  cache_filter = ActionCacheFilter.new(:layout => options.delete(:layout), :cache_path => options.delete(:cache_path), :store_options => options)
  around_filter(filter_options) do |controller, action|
    cache_filter.filter(controller, action)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.