I have a Django app. I want to use django-redis to cache the results of my queries so as to improve the app performance. I’ve implemented this on the local server and it works as intended. When deployed on a live server, I get an Internal Server Error. This is because of the configurations of Redis to the app which forms the basis of my question. How should I go about configuring my app with Redis. I’m deploying using AWS.
Below are the cache settings in settings.py
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/1",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient"
},
"KEY_PREFIX": "example"
}
}```