2
0

Add option to use native Ruby driver for Redis (#30717)

This commit is contained in:
Michael Stanclift
2024-06-17 07:28:01 -05:00
committed by GitHub
parent d7b7617321
commit d5f02adad7
2 changed files with 9 additions and 3 deletions

View File

@@ -42,9 +42,13 @@ class RedisConfiguration
ENV['REDIS_URL']
end
def redis_driver
ENV.fetch('REDIS_DRIVER', 'hiredis') == 'ruby' ? :ruby : :hiredis
end
private
def raw_connection
Redis.new(url: url, driver: :hiredis)
Redis.new(url: url, driver: redis_driver)
end
end