Commit c4b6c031 by liyijie

feat: 更新redis的配置

parent 0245aa45
......@@ -3,6 +3,10 @@ redis_config.merge!(password: ENV["REDIS_PASSWORD"]) if ENV["REDIS_PASSWORD"].pr
redis_config.merge!(db: ENV["REDIS_DB"]) if ENV["REDIS_DB"].present?
Ohm.redis = Redis.new(redis_config)
Redis::Objects.redis = Redis.new(redis_config)
# 系统中各模块需要使用的redis
$redis = Redis.new(redis_config)
$token_redis = Redis::Namespace.new(:token, redis: $redis)
Redis::Objects.redis = Redis.new(redis_config)
$verify_code_redis = Redis::Namespace.new(:verify_code, redis: $redis)
$limit_redis = Redis::Namespace.new(:limit, redis: $redis)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment