Module: ApiResponseCache::Actions::ClassMethods

Defined in:
lib/api_response_cache/actions.rb

Instance Method Summary collapse

Instance Method Details

#cache_response_for(*actions) ⇒ Object



5
6
7
8
9
# File 'lib/api_response_cache/actions.rb', line 5

def cache_response_for(*actions)
  options = actions.extract_options!
  filter_options = options.extract!(:if, :unless).merge(only: actions)
  around_action  ApiCacheHandler.new(options), filter_options
end