Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Redic::Pool

A Redis connection pool using Redic.

Usage

require "redic/pool"

$redis = Redic::Pool.new("redis://localhost:6379", size: 10)

Array.new(100) do
  Thread.new do
    $redis.call("GET", "foo")
  end
end.each(&:join)

$redis.call("INFO", "clients")[/connected_clients:(\d+)/, 1]
# => "10"

With Ohm

Assuming you use Ohm 2.0+:

require "redic/pool"
require "ohm"

Ohm.redis = Redic::Pool.new(ENV["REDIS_URL"], size: 10)

About

A Redis connection pool using Redic.

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.