Module: RestrictCache::RailsExt::ActionController::ClassMethods

Defined in:
lib/restrict_cache/rails_ext/action_controller.rb

Instance Method Summary collapse

Instance Method Details

#cache_sweep_action(*args) ⇒ Object



7
8
9
10
11
12
# File 'lib/restrict_cache/rails_ext/action_controller.rb', line 7

def cache_sweep_action(*args)
  options = args.extract_options!
  actions = args.empty? ? {} : {only: args}
  options.merge! actions unless actions.empty?
  around_action :sweep_restrict_cache, options
end