Sha256: 2c773afd9339295bd6792bcf5707664b237d3b3f7f07d27e27cfe51d62a0f695
Contents?: true
Size: 520 Bytes
Versions: 39
Compression:
Stored size: 520 Bytes
Contents
module Switchman module ActiveSupport module Cache module ClassMethods def lookup_store_with_sharding(*store_options) store = lookup_store_without_sharding(*store_options) store.options[:namespace] ||= lambda { Shard.current.default? ? nil : "shard_#{Shard.current.id}" } store end end def self.included(klass) klass.extend(ClassMethods) klass.singleton_class.alias_method_chain(:lookup_store, :sharding) end end end end
Version data entries
39 entries across 39 versions & 1 rubygems