Django Using Redis with Django - Caching Backend

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Remarks

Using django-redis-cache or django-redis are both effective solutions for storing all cached items. While it is certainly possible for Redis to be setup directly as a SESSION_ENGINE, one effective strategy is to setup the caching (as above) and declare your default cache as a SESSION_ENGINE. While this is really the topic for another documentaiton article, its relevance leads to inclusion.

Simply add the following to settings.py:

SESSION_ENGINE = "django.contrib.sessions.backends.cache"


Got any Django Question?