Sha256: 155bce75bf5c6eea875a105968d80e899300ff6cde8880342dbe16c1303be619

Contents?: true

Size: 288 Bytes

Versions: 9

Compression:

Stored size: 288 Bytes

Contents

require 'redis'

module Hippo

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hippo-fw-0.9.9 lib/hippo/redis.rb
hippo-fw-0.9.8 lib/hippo/redis.rb
hippo-fw-0.9.7 lib/hippo/redis.rb
hippo-fw-0.9.6 lib/hippo/redis.rb
hippo-fw-0.9.5 lib/hippo/redis.rb
hippo-fw-0.9.4 lib/hippo/redis.rb
hippo-fw-0.9.3 lib/hippo/redis.rb
hippo-fw-0.9.2 lib/hippo/redis.rb
hippo-fw-0.9.1 lib/hippo/redis.rb