Sha256: 9abff3ade5c4cceb334c7ecd62481cd826621307532ba3506bf17de9bb85eaef

Contents?: true

Size: 435 Bytes

Versions: 1

Compression:

Stored size: 435 Bytes

Contents

require 'redis'
require 'redis-namespace'
require 'connection_pool'
require 'hella-redis/version'

module HellaRedis::RedisConnection

  def self.new(config)
    @pool = ::ConnectionPool.new(:timeout => config.timeout, :size => config.size) do
      ::Redis::Namespace.new(config.redis_ns, {
        :redis => ::Redis.connect({
          :url    => config.url,
          :driver => config.driver
        })
      })
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hella-redis-0.1.1 lib/hella-redis/redis_connection.rb