Module: ActiveSupport::Cache

Module | ActiveSupport::Cache
In: | lib/active_support/cache/compressed_mem_cache_store.rb lib/active_support/cache/drb_store.rb lib/active_support/cache/file_store.rb lib/active_support/cache/mem_cache_store.rb lib/active_support/cache/memory_store.rb lib/active_support/cache/strategy/local_cache.rb lib/active_support/cache/synchronized_memory_store.rb lib/active_support/cache.rb

See ActiveSupport::Cache::Store for documentation.

### Methods

expand_cache_key lookup_store

### Classes and Modules

Module ActiveSupport::Cache::Strategy
Class ActiveSupport::Cache::CompressedMemCacheStore
Class ActiveSupport::Cache::FileStore
Class ActiveSupport::Cache::MemCacheStore
Class ActiveSupport::Cache::MemoryStore
Class ActiveSupport::Cache::Store
Class ActiveSupport::Cache::SynchronizedMemoryStore

### Public Class methods

expand_cache_key(key, namespace = nil)
lookup_store(*store_option)

Creates a new CacheStore object according to the given options.

If no arguments are passed to this method, then a new ActiveSupport::Cache::MemoryStore object will be returned.

If you pass a Symbol as the first argument, then a corresponding cache store class under the ActiveSupport::Cache namespace will be created. For example:

      ActiveSupport::Cache.lookup_store(:memory_store)
      # => returns a new ActiveSupport::Cache::MemoryStore object

      ActiveSupport::Cache.lookup_store(:drb_store)
      # => returns a new ActiveSupport::Cache::DRbStore object

Any additional arguments will be passed to the corresponding cache store class‘s constructor:

      ActiveSupport::Cache.lookup_store(:file_store, "/tmp/cache")
      # => same as: ActiveSupport::Cache::FileStore.new("/tmp/cache")

If the first argument is not a Symbol, then it will simply be returned:

      ActiveSupport::Cache.lookup_store(MyOwnCacheStore.new)
      # => returns MyOwnCacheStore.new

[Validate]