1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Rdoc for changes introduced in e2ed1a1ca, 36058f450.

[#3451 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
David Vrensk 2009-11-01 16:46:12 +01:00 committed by Jeremy Kemper
parent 82b9b151ff
commit af44b07649
2 changed files with 6 additions and 0 deletions

View file

@ -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

View file

@ -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