Sha256: 32c7b437451326ff11d437f43660d13e6d9bcb0ecb25b464bcd0add5dfa81ab8

Contents?: true

Size: 288 Bytes

Versions: 12

Compression:

Stored size: 288 Bytes

Contents

require 'redis'

module Lanes

    # returns a persistent connection to the Redis instance
    def self.redis_connection(cache: true)
        if cache
            @@REDIS ||= ::Redis.new(Lanes.config.redis)
        else
            ::Redis.new(Lanes.config.redis)
        end
    end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
lanes-0.8.3 lib/lanes/redis.rb
lanes-0.8.2 lib/lanes/redis.rb
lanes-0.8.1 lib/lanes/redis.rb
lanes-0.8.0 lib/lanes/redis.rb
lanes-0.7.0 lib/lanes/redis.rb
lanes-0.6.1 lib/lanes/redis.rb
lanes-0.6.0 lib/lanes/redis.rb
lanes-0.5.6 lib/lanes/redis.rb
lanes-0.5.5 lib/lanes/redis.rb
lanes-0.5.0 lib/lanes/redis.rb
lanes-0.4.0 lib/lanes/redis.rb
lanes-0.3.0 lib/lanes/redis.rb