redis对象开启

This commit is contained in:
xxq250 2023-01-13 11:19:53 +08:00
parent 45d23a0aad
commit cc9f2214b5
1 changed files with 1 additions and 1 deletions

View File

@ -1,3 +1,3 @@
redis_config = Rails.application.config_for(:redis)
cache_url = redis_config["url"] || 'redis://localhost:6379'
# $redis_cache = Redis.new(url: cache_url, db: 2)
$redis_cache = Redis.new(url: cache_url, db: 2)