提交 8fc6ec73 编写于 作者: S Steven Harman 提交者: Jeremy Daer

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]
上级 4acddae0
......@@ -152,12 +152,14 @@ def build_redis_client(url:, **redis_options)
# 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: <tt>namespace: 'myapp-cache'</tt>.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册