diff options
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/redis.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config/initializers/redis.rb b/config/initializers/redis.rb index 63fc425573a..4ed53ec07d9 100644 --- a/config/initializers/redis.rb +++ b/config/initializers/redis.rb @@ -17,8 +17,9 @@ redis_connection = Redis.new( cache_params = { expires_in: 10.minutes } namespace = ENV.fetch('REDIS_NAMESPACE') { nil } + if namespace - Redis.current = Redis::Namespace.new(namespace, :redis => redis_connection) + Redis.current = Redis::Namespace.new(namespace, redis: redis_connection) cache_params[:namespace] = namespace + '_cache' else Redis.current = redis_connection |