Method: CacheMethod::Config#storage=
- Defined in:
- lib/cache_method/config.rb
#storage=(storage = nil) ⇒ Object
Storage for the cache.
Supported memcached clients:
-
memcached (either a Memcached or a Memcached::Rails)
-
dalli (either a Dalli::Client or an ActiveSupport::Cache::DalliStore)
-
memcache-client (MemCache, the one commonly used by Rails)
Supported Redis clients:
Uses the cache gem to wrap these, so support depends on that gem
Example:
CacheMethod.config.storage = Memcached.new '127.0.0.1:11211'
45 46 47 |
# File 'lib/cache_method/config.rb', line 45 def storage=(storage = nil) @storage = ::Cache.wrap storage end |