method

build_redis

Importance_1
v7.0.0 - Show latest stable - 0 notes - Class: RedisCacheStore
build_redis(redis: nil, url: nil, **redis_options) public

Factory method to create a new Redis instance.

Handles four options: :redis block, :redis instance, single :url string, and multiple :url strings.

Option  Class       Result
:redis  Proc    ->  options[:redis].call
:redis  Object  ->  options[:redis]
:url    String  ->  Redis.new(url: …)
:url    Array   ->  Redis::Distributed.new([{ url: … }, { url: … }, …])
Show source
Register or log in to add new notes.