diff options
author | Anton Davydov <antondavydov.o@gmail.com> | 2015-05-21 22:58:31 +0300 |
---|---|---|
committer | Anton Davydov <antondavydov.o@gmail.com> | 2015-05-21 23:24:12 +0300 |
commit | b485eb33fafc90811dcbbf472815744908cb9257 (patch) | |
tree | bf2f0d284e885f123c8243f736329dcecc7932d6 /activesupport/lib/active_support/cache | |
parent | f271f43f1059982e4e43c29ba2f8abc974ba0ea8 (diff) | |
download | rails-b485eb33fafc90811dcbbf472815744908cb9257.tar.gz rails-b485eb33fafc90811dcbbf472815744908cb9257.tar.bz2 rails-b485eb33fafc90811dcbbf472815744908cb9257.zip |
[skip ci] Update documentation for MemCacheStore::build_mem_cache
Diffstat (limited to 'activesupport/lib/active_support/cache')
-rw-r--r-- | activesupport/lib/active_support/cache/mem_cache_store.rb | 9 |
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? |