Class: ActiveSupport::Cache::BitzerStore

Inherits:
Store
  • Object
show all
Defined in:
lib/active_support/cache/bitzer_store.rb

Constant Summary collapse

VERSION =
Gem::Version.new("0.0.1")
PUBLIC_METHODS =
%w|clanup clear read fetch delete exist? delete_matched write increment decrement|
PROTECTED_METHODS =
%w|read_entry write_entry delete_entry|

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ BitzerStore

Returns a new instance of BitzerStore.

Raises:

  • (ArgumentError)


8
9
10
11
12
13
14
15
# File 'lib/active_support/cache/bitzer_store.rb', line 8

def initialize(config)
  raise ArgumentError, "BitzerStore needs default config. Supply a hash with a :default key." unless config.has_key?(:default)

  @flocks = {}
  config.each do |name, store_option|
    @flocks[name.to_sym] = ActiveSupport::Cache.lookup_store(store_option)
  end
end