aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-05-21 17:30:13 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-05-21 17:30:13 -0300
commitdc537669f2241554431f5a767af1ee4fb403fc69 (patch)
tree2a99b10ba906eed94a2940faaf2560f04a7a323d /activesupport
parentd345ce9630ce4c01bc81a09fb015e7bd935600ad (diff)
parentb485eb33fafc90811dcbbf472815744908cb9257 (diff)
downloadrails-dc537669f2241554431f5a767af1ee4fb403fc69.tar.gz
rails-dc537669f2241554431f5a767af1ee4fb403fc69.tar.bz2
rails-dc537669f2241554431f5a767af1ee4fb403fc69.zip
Merge pull request #20250 from davydovanton/doc-mem-cache-store
Update documentation for MemCacheStore::build_mem_cache [ci skip]
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/cache/mem_cache_store.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb
index 73ae3acea5..47133bf550 100644
--- a/activesupport/lib/active_support/cache/mem_cache_store.rb
+++ b/activesupport/lib/active_support/cache/mem_cache_store.rb
@@ -26,7 +26,14 @@ module ActiveSupport
class MemCacheStore < Store
ESCAPE_KEY_CHARS = /[\x00-\x20%\x7F-\xFF]/n
- def self.build_mem_cache(*addresses)
+ # Creates a new Dalli::Client instance with specified addresses and options.
+ # By default address is equal localhost:11211.
+ #
+ # ActiveSupport::Cache::MemCacheStore.build_mem_cache
+ # # => #<Dalli::Client:0x007f98a47d2028 @servers=["localhost:11211"], @options={}, @ring=nil>
+ # ActiveSupport::Cache::MemCacheStore.build_mem_cache('localhost:10290')
+ # # => #<Dalli::Client:0x007f98a47b3a60 @servers=["localhost:10290"], @options={}, @ring=nil>
+ def self.build_mem_cache(*addresses) # :nodoc:
addresses = addresses.flatten
options = addresses.extract_options!
addresses = ["localhost:11211"] if addresses.empty?