Remove redis cache for django rest api for now as it returns stale data and improved dockerfile and study group viewsets

This commit is contained in:
Keannu Christian Bernasol 2023-09-20 21:11:53 +08:00
parent 3aacf66aaf
commit 46fe8d9397
4 changed files with 54 additions and 13 deletions

View file

@ -267,17 +267,17 @@ LEAFLET_CONFIG = {
REDIS_HOST = os.getenv('REDIS_HOST')
REDIS_PORT = os.getenv('REDIS_PORT')
# Django Redis Cache
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://redis:6379/0",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
}
}
# CACHES = {
# "default": {
# "BACKEND": "django_redis.cache.RedisCache",
# "LOCATION": "redis://redis:6379/0",
# "OPTIONS": {
# "CLIENT_CLASS": "django_redis.client.DefaultClient",
# }
# }
# }
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
SESSION_CACHE_ALIAS = "default"