module AnyCache::Drivers::ActiveSupportMemCacheStore

Public Class Methods

build(settings) click to toggle source

@param settings [Qonfig:Settings] @return [::ActiveSupport::Cache::MemCacheStore]

@api private @since 0.2.0

# File lib/any_cache/drivers/active_support_mem_cache_store.rb, line 21
def build(settings)
  ::ActiveSupport::Cache::MemCacheStore.new([Array(settings.servers), settings.options])
end
supported_source?(driver) click to toggle source

@param driver [::ActiveSupport::Cache::MemCacheStore] @return [Boolean]

@api private @since 0.2.0

# File lib/any_cache/drivers/active_support_mem_cache_store.rb, line 10
def supported_source?(driver)
  defined?(::Dalli) &&
  defined?(::ActiveSupport::Cache::MemCacheStore) &&
  driver.is_a?(::ActiveSupport::Cache::MemCacheStore)
end