Module: Switchman::ActiveSupport::Cache::Store
- Defined in:
- lib/switchman/active_support/cache.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
11 12 13 |
# File 'lib/switchman/active_support/cache.rb', line 11 def self.included(klass) klass.alias_method_chain(:initialize, :sharding) end |
Instance Method Details
#initialize_with_sharding(options = nil) ⇒ Object
5 6 7 8 9 |
# File 'lib/switchman/active_support/cache.rb', line 5 def initialize_with_sharding( = nil) ||= {} [:namespace] ||= lambda { Shard.current.default? ? nil : "shard_#{Shard.current.id}" } initialize_without_sharding() end |