aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Vrensk <david@vrensk.com>2009-11-01 16:46:12 +0100
committerJeremy Kemper <jeremy@bitsweat.net>2009-11-12 11:21:44 -0800
commitaf44b0764965a9ae1f77290056473b35eac79562 (patch)
treeb3d4c65cc6aec93f18df6a3ac851828efbd32c5c
parent82b9b151ffde44305d67744c0bfd9bb5505f6fbe (diff)
downloadrails-af44b0764965a9ae1f77290056473b35eac79562.tar.gz
rails-af44b0764965a9ae1f77290056473b35eac79562.tar.bz2
rails-af44b0764965a9ae1f77290056473b35eac79562.zip
Rdoc for changes introduced in e2ed1a1ca, 36058f450.
[#3451 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
-rw-r--r--actionpack/lib/action_controller/caching.rb1
-rw-r--r--activesupport/lib/active_support/cache/mem_cache_store.rb5
2 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb
index 083d6328af..3caf759032 100644
--- a/actionpack/lib/action_controller/caching.rb
+++ b/actionpack/lib/action_controller/caching.rb
@@ -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
diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb
index bec9de86ed..1b6b820ca4 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