Django-redis session configuration cache and

= {CACHES 
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "Redis: //: password @ Host: 6379/3",
"the OPTIONS": {
"CLIENT_CLASS": "django_redis .client.DefaultClient ",
}
}
}

# Django default session is stored in the cache, so the session is stored in redis in
SESSION_ENGINE =" django.contrib.sessions.backends.cache "
SESSION_CACHE_ALIAS =" default "

note" LOCATION ":" redis : //: password @ host: 6379/3 ", when specifying a password, according to the official website can not write [: password], no need to write [], otherwise an error

Guess you like

Origin www.cnblogs.com/olivertian/p/10984625.html