From d0bfc4e78dfae585a3b6c003561fe804b4807b22 Mon Sep 17 00:00:00 2001 From: David Vrensk Date: Sun, 1 Nov 2009 16:30:57 +0100 Subject: [PATCH] Rdoc for changes introduced in 6339e5d36, 542d6a0abd. --- actionpack/lib/action_controller/caching.rb | 1 + .../lib/active_support/cache/mem_cache_store.rb | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index f686223..a379485 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -22,6 +22,7 @@ module ActionController #:nodoc: # ActionController::Base.cache_store = :file_store, "/path/to/cache/directory" # ActionController::Base.cache_store = :drb_store, "druby://localhost:9192" # ActionController::Base.cache_store = :mem_cache_store, "localhost" + # ActionController::Base.cache_store = :mem_cache_store, Memcached::Rails.new("localhost:11211") # ActionController::Base.cache_store = MyOwnStore.new("parameter") module Caching autoload :Actions, 'action_controller/caching/actions' diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb index 954d0f5..1755258 100644 --- a/activesupport/lib/active_support/cache/mem_cache_store.rb +++ b/activesupport/lib/active_support/cache/mem_cache_store.rb @@ -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 -- 1.6.0