From 8fc6ec73a406aa8b6cccd450d08f42e33e419b2c Mon Sep 17 00:00:00 2001 From: Steven Harman Date: Thu, 18 Apr 2019 17:29:22 -0400 Subject: Document redis: Object option There are four ways to pass the redis option, but only three were documented. This is now consistent with implementation. [ci skip] --- activesupport/lib/active_support/cache/redis_cache_store.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/activesupport/lib/active_support/cache/redis_cache_store.rb b/activesupport/lib/active_support/cache/redis_cache_store.rb index 87f9aa5346..bb092fcde9 100644 --- a/activesupport/lib/active_support/cache/redis_cache_store.rb +++ b/activesupport/lib/active_support/cache/redis_cache_store.rb @@ -152,12 +152,14 @@ module ActiveSupport # Creates a new Redis cache store. # - # Handles three options: block provided to instantiate, single URL - # provided, and multiple URLs provided. + # Handles four options: :redis block, :redis instance, single :url + # string, and multiple :url strings. # - # :redis Proc -> options[:redis].call - # :url String -> Redis.new(url: …) - # :url Array -> Redis::Distributed.new([{ url: … }, { url: … }, …]) + # Option Class Result + # :redis Proc -> options[:redis].call + # :redis Object -> options[:redis] + # :url String -> Redis.new(url: …) + # :url Array -> Redis::Distributed.new([{ url: … }, { url: … }, …]) # # No namespace is set by default. Provide one if the Redis cache # server is shared with other apps: namespace: 'myapp-cache'. -- cgit v1.2.3