Module: ActAsCached::CacheOptions::ClassMethods

Defined in:
lib/act_as_cached/cache_options.rb

Instance Method Summary collapse

Instance Method Details

#loggerObject



24
25
26
# File 'lib/act_as_cached/cache_options.rb', line 24

def logger
  options[:logger] || ActAsCached.logger
end

#nameObject



12
13
14
# File 'lib/act_as_cached/cache_options.rb', line 12

def name
  @name ||= klass.name
end

#optionsObject



8
9
10
# File 'lib/act_as_cached/cache_options.rb', line 8

def options
  @options ||= cache_options.extract_options!
end

#prefixObject



16
17
18
# File 'lib/act_as_cached/cache_options.rb', line 16

def prefix
  options[:prefix] || ActAsCached.prefix
end

#storeObject



20
21
22
# File 'lib/act_as_cached/cache_options.rb', line 20

def store
  options[:cache_store] || ActAsCached.cache_store
end

#timeObject



28
29
30
# File 'lib/act_as_cached/cache_options.rb', line 28

def time
  options[:expires_time] || ActAsCached.expires_time
end