Class: CacheCrispies::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/cache_crispies/configuration.rb

Constant Summary collapse

SETTINGS =
[
  :cache_store,
  :etags,
  :cache_key_method
].freeze

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



17
18
19
# File 'lib/cache_crispies/configuration.rb', line 17

def initialize
  reset!
end

Instance Method Details

#reset!Object

Resets all values to their defaults. Useful for testing.



25
26
27
28
29
# File 'lib/cache_crispies/configuration.rb', line 25

def reset!
  @cache_store = Rails.cache || ActiveSupport::Cache::NullStore.new
  @etags = false
  @cache_key_method = :cache_key
end