module ActiveModel::Serializer::Caching::ClassMethods

def cache(options = {})

Other tags:
    Todo: - require less code comments. See

Parameters:
  • options (Hash) -- with valid keys:
def cache(options = {})
  self._cache =
    options.delete(:cache_store) ||
    ActiveModelSerializers.config.cache_store ||
    ActiveSupport::Cache.lookup_store(:null_store)
  self._cache_key = options.delete(:key)
  self._cache_only = options.delete(:only)
  self._cache_except = options.delete(:except)
  self._cache_options = options.empty? ? nil : options
end