chore(bundle): +kredis

This commit is contained in:
Colin Darie 2024-01-24 09:44:24 +01:00
parent 15e0ed8480
commit 4d1988fd66
No known key found for this signature in database
GPG key ID: 8C76CADD40253590
3 changed files with 13 additions and 0 deletions

View file

@ -54,6 +54,7 @@ gem 'invisible_captcha'
gem 'json_schemer'
gem 'jwt'
gem 'kaminari'
gem 'kredis'
gem 'listen' # Required by ActiveSupport::EventedFileUpdateChecker
gem 'lograge'
gem 'logstash-event'

View file

@ -379,6 +379,10 @@ GEM
activerecord
kaminari-core (= 1.2.2)
kaminari-core (1.2.2)
kredis (1.7.0)
activemodel (>= 6.0.0)
activesupport (>= 6.0.0)
redis (>= 4.2, < 6)
launchy (2.5.0)
addressable (~> 2.7)
letter_opener (1.7.0)
@ -876,6 +880,7 @@ DEPENDENCIES
json_schemer
jwt
kaminari
kredis
launchy
letter_opener_web
listen

View file

@ -0,0 +1,7 @@
redis_volatile_options = {
url: ENV['REDIS_CACHE_URL'], # will fallback to default redis url if empty, and won't fail if there is no redis server
ssl: ENV['REDIS_CACHE_SSL'] == 'enabled'
}
redis_volatile_options[:ssl_params] = { verify_mode: OpenSSL::SSL::VERIFY_NONE } if ENV['REDIS_CACHE_SSL_VERIFY_NONE'] == 'enabled'
Kredis::Connections.connections[:volatile] = Redis.new(redis_volatile_options)