Module: AnyCache::Drivers::ActiveSupportFileStore Private

Defined in:
lib/any_cache/drivers/active_support_file_store.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.2.0

Class Method Summary collapse

Class Method Details

.build(settings) ⇒ ::ActiveSupport::Cache::FileStore

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • settings (Qonfig::Settings)

Returns:

  • (::ActiveSupport::Cache::FileStore)

Since:

  • 0.2.0



22
23
24
# File 'lib/any_cache/drivers/active_support_file_store.rb', line 22

def build(settings)
  ::ActiveSupport::Cache::FileStore.new(settings.cache_path, settings.options)
end

.supported_source?(driver) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • driver (::ActiveSupport::Cache::FileStore)

Returns:

  • (Boolean)

Since:

  • 0.2.0



12
13
14
15
# File 'lib/any_cache/drivers/active_support_file_store.rb', line 12

def supported_source?(driver)
  defined?(::ActiveSupport::Cache::FileStore) &&
  driver.is_a?(::ActiveSupport::Cache::FileStore)
end