Update redis_store.rb to reuse single connection #136

Closed
wants to merge 1 commit into
from
View
2 Ruby/lib/mini_profiler/storage/redis_store.rb
@@ -38,7 +38,7 @@ def get_unviewed_ids(user)
def redis
return @redis_connection if @redis_connection
require 'redis' unless defined? Redis
- Redis.new @args
+ @redis ||= Redis.new @args
end
end