Updated settings to use redis cluster

This commit is contained in:
Devoalda 2023-11-01 09:53:33 +08:00
parent ef1b718676
commit 39430444e3
1 changed files with 7 additions and 0 deletions

View File

@ -166,6 +166,13 @@ if env.bool('CACHE', default=False):
"default": {
"BACKEND": "django.core.cache.backends.redis.RedisCache",
"LOCATION": f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_DB}",
"OPTIONS": {
'REDIS_CLIENT_CLASS': 'rediscluster.StrictRedisCluster',
'CONNECTION_POOL_CLASS': 'rediscluster.connection.ClusterConnectionPool',
'CONNECTION_POOL_KWARGS': {
'skip_full_coverage_check': True
}
},
}
}