store sessions in redis if redis is available
This commit is contained in:
parent
0e171166e8
commit
2e09b286f4
1 changed files with 1 additions and 1 deletions
|
@ -260,9 +260,9 @@ if HAS_REDIS:
|
|||
}
|
||||
if not HAS_MEMCACHED:
|
||||
CACHES['default'] = CACHES['redis']
|
||||
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
|
||||
else:
|
||||
SESSION_CACHE_ALIAS = "redis"
|
||||
SESSION_ENGINE = "django.contrib.sessions.backends.cached"
|
||||
|
||||
REDIS_CONNECTION_POOL = redis.ConnectionPool.from_url(REDIS_SERVERS[0])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue