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

106 views
Skip to first unread message

Benedikt Vogler

unread,
Feb 14, 2022, 9:05:50 AM2/14/22
to Django users
Hi!
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
Reply all
Reply to author
Forward
0 new messages