Monday, February 14, 2022

Migrating from django-redis to Django 4 new redis back-end

I wanted to migrate from django-redis to the new built-in Redis caching back-end.

Previously I could access the existing connection with django_redis.get_redis_connection to get a redis-py client.
For example, explained here.

Is there something similar to obtain a redis-py object from the caching setting in Django?
from django.core.cache import caches
caches["default"] returns a RedisCache object.

Or is the solution to stick to django-redis?

Kind regards,
Benedikt Vogler

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

No comments:

Post a Comment