Method: ActiveSupport::Cache::MonetaStore#initialize

Defined in:
lib/active_support/cache/moneta_store.rb

#initialize(options = nil) ⇒ MonetaStore

Returns a new instance of MonetaStore.

Raises:

  • (ArgumentError)


5
6
7
8
9
10
# File 'lib/active_support/cache/moneta_store.rb', line 5

def initialize(options = nil)
  raise ArgumentError, 'Option :store is required' unless @store = options.delete(:store)
  @store = ::Moneta.new(@store, expires: true) if Symbol === @store
  super(options)
  extend Strategy::LocalCache
end