mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[#3451 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
parent
82b9b151ff
commit
af44b07649
2 changed files with 6 additions and 0 deletions
|
@ -26,6 +26,7 @@ module ActionController #:nodoc:
|
|||
# config.action_controller.cache_store = :file_store, "/path/to/cache/directory"
|
||||
# config.action_controller.cache_store = :drb_store, "druby://localhost:9192"
|
||||
# config.action_controller.cache_store = :mem_cache_store, "localhost"
|
||||
# config.action_controller.cache_store = :mem_cache_store, Memcached::Rails.new("localhost:11211")
|
||||
# config.action_controller.cache_store = MyOwnStore.new("parameter")
|
||||
module Caching
|
||||
extend ActiveSupport::Concern
|
||||
|
|
|
@ -38,6 +38,11 @@ module ActiveSupport
|
|||
#
|
||||
# If no addresses are specified, then MemCacheStore will connect to
|
||||
# localhost port 11211 (the default memcached port).
|
||||
#
|
||||
# Instead of addresses one can pass in a MemCache-like object. For example:
|
||||
#
|
||||
# require 'memcached' # gem install memcached; uses C bindings to libmemcached
|
||||
# ActiveSupport::Cache::MemCacheStore.new(Memcached::Rails.new("localhost:11211"))
|
||||
def initialize(*addresses)
|
||||
if addresses.first.respond_to?(:get)
|
||||
@data = addresses.first
|
||||
|
|
Loading…
Reference in a new issue