NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1153 most downloaded on PyPI
Full featured redis cache backend for Django.
Last release 4 months ago
02 Jun 2026
Ships fairly regularly
a new release about every 10 months
Most releases are documented
notes for 51 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
70 releases · first in 2011
django-redis 7.0.0 (2026-06-02)
RedisCache does not attempt to close clients which have not been initialized. (#796)pyproject.toml, drop EoL Python & DjangoRedisCache. (#829)types-redis package, and update the public API to avoid exposing redis-py key types (the encode/decode/make_key methods allow a different API surface). (#822)RedisCache.close to not forward kwargs to the client implementation. (#788)from __future__ import annotations to postpone evaluation of annotations. (#823)testsOne column per quarter.
django-redis 6.0.0 (2025-06-17)
#598 <https://github.com/jazzband/django-redis/issues/598>_)#688 <https://github.com/jazzband/django-redis/issues/688>_)#730 <https://github.com/jazzband/django-redis/issues/730>_)#724 <https://github.com/jazzband/django-redis/issues/724>_)#749 <https://github.com/jazzband/django-redis/issues/749>_)cache.lock (#752 <https://github.com/jazzband/django-redis/issues/752>_)#689 <https://github.com/jazzband/django-redis/issues/689>_)#690 <https://github.com/jazzband/django-redis/issues/690>_)#692 <https://github.com/jazzband/django-redis/issues/692>_)#693 <https://github.com/jazzband/django-redis/issues/693>_)#695 <https://github.com/jazzband/django-redis/issues/695>_)#696 <https://github.com/jazzband/django-redis/issues/696>_)#697 <https://github.com/jazzband/django-redis/issues/697>_)#699 <https://github.com/jazzband/django-redis/issues/699>_)#701 <https://github.com/jazzband/django-redis/issues/701>_)#702 <https://github.com/jazzband/django-redis/issues/702>_)#703 <https://github.com/jazzband/django-redis/issues/703>_)#729 <https://github.com/jazzband/django-redis/issues/729>_)#754 <https://github.com/jazzband/django-redis/issues/754>_)#755 <https://github.com/jazzband/django-redis/issues/755>_)#756 <https://github.com/jazzband/django-redis/issues/756>_)pytest-xdist and separating settings on different redis databases.pytest-djangodocker-compose for setting up redis containers for testingtox-uv (#757 <https://github.com/jazzband/django-redis/issues/757>_)#824 <https://github.com/jazzband/django-redis/issues/824>_)#852 <https://github.com/jazzband/django-redis/issues/852>_)Support HashMaps (#598)
Support gzip compression (#688)
Support for sets and support basic operations, sadd, scard, sdiff, sdiffstore, sinter, sinterstore, smismember, sismember, smembers, smove, spop, srandmember, srem, sscan, sscan_iter, sunion, sunionstore (#730)
Hotfix for timeout=DEFAULT_TIMEOUT in expire and pexpire (#724)
Fix is_master parsing error for write separation in sentinel mode (#749)
Added blocking parameter for cache.lock (#752)
Added support for Python 3.12 (#689)
Pin pytest to <7.0 until compatibility issues are resolved (#690)
Replace isort and flake8 with ruff (#692)
Drop django 4.0 (#693)
Upgrade black to 23.10.1 (#695)
Typed DefaultClient (#696)
Support pytest>=7 (#697)
Drop support for django 3.2, python 3.6 and python 3.7 (#699)
Support tox 4 (#701)
Configured dependabot for github actions (#702)
Use ubuntu-latest for CI (#703)
Dropped support for django 4.1 and added support for django 5.0 (#729)
Added support for django 5.1 (#754)
Update minimum supported versions in README.md: Python to 3.8, Django to 4.2, redis-py to 4.0.2 (#755)
Added support for Python 3.13 (#756)
Speed up tests by using pytest-xdist and separating settings on different redis databases. Dropped pytest-django Using docker-compose for setting up redis containers for testing Use tox-uv (#757)
Confirm support for Django 5.2. Fix shadowing builtin Python exceptions. (#824)
Drop support for Python 3.8 (#852)
django-redis 5.4.0 (2023-10-01)
#680 <https://github.com/jazzband/django-redis/issues/680>_)#677 <https://github.com/jazzband/django-redis/issues/677>_)Add support for django 4 (#627 _)
#627 <https://github.com/jazzband/django-redis/issues/627>_)django_redis.cache.DJANGO_REDIS_SCAN_ITERSIZE and django_redis.client.herd.CACHE_HERD_TIMEOUT in runtime to not read Django settings in import time. (#638 <https://github.com/jazzband/django-redis/issues/638>_)#646 <https://github.com/jazzband/django-redis/issues/646>_)#609 <https://github.com/jazzband/django-redis/issues/609>_)#611 <https://github.com/jazzband/django-redis/issues/611>_)#626 <https://github.com/jazzband/django-redis/issues/626>_)#633 <https://github.com/jazzband/django-redis/issues/633>_)#645 <https://github.com/jazzband/django-redis/issues/645>_)#649 <https://github.com/jazzband/django-redis/issues/649>_)#668 <https://github.com/jazzband/django-redis/issues/668>_)#627 <https://github.com/jazzband/django-redis/issues/627>_)django_redis.cache.DJANGO_REDIS_SCAN_ITERSIZE and django_redis.client.herd.CACHE_HERD_TIMEOUT in runtime to not read Django settings in import time. (#638 <https://github.com/jazzband/django-redis/issues/638>_)#646 <https://github.com/jazzband/django-redis/issues/646>_)#609 <https://github.com/jazzband/django-redis/issues/609>_)#611 <https://github.com/jazzband/django-redis/issues/611>_)#626 <https://github.com/jazzband/django-redis/issues/626>_)#633 <https://github.com/jazzband/django-redis/issues/633>_)#645 <https://github.com/jazzband/django-redis/issues/645>_)#649 <https://github.com/jazzband/django-redis/issues/649>_)#668 <https://github.com/jazzband/django-redis/issues/668>_)Block use with broken redis-py 4.0.0 and 4.0.1 ( #542 <https://github.com/jazzband/django-redis/issues/542> _)
===============================
#542 <https://github.com/jazzband/django-redis/issues/542>_)#576 <https://github.com/jazzband/django-redis/issues/576>_)#579 <https://github.com/jazzband/django-redis/issues/579>_)Pin redis-py to 3.x until 4.x breaking changes can be addressed. (#570 _)
Add Python 3.10 to CI (#536)
Configured towncrier to generate the changelog. (#548)
Added django_redis.compressors.zstd.ZStdCompressor to provide pyzstd cache value compression. (#551)
Change pickle default version to Python default instead of highest version. (#555)
Add hiredis extra dependency to request redis[hiredis]. (#556)
Add pexpireat to allow setting 'expire at' with millisecond precision. (#564)
Make expire, pexpire, expireat and persist return the redis client value (#564)
Convert most unittest class tests to pytest tests. (#553)
Update type comments to type annotations. (#568)
Pin redis-py to 3.x until 4.x breaking changes can be addressed. (#570)
supporting django 3.1 and django 3.2
supporting django 3.1 and django 3.2
dropped support for python 3.5
added support for python 3.9
started type hinting the codebase
ensure connections are closed
fixed ShardClient .clear() method
.delete() now returns boolean from django 3.1 onwards
disconnect connection pools on .close()
added support for redis sentinel
added .expire_at() method
fixed .incr() when ttl is None or when the number is larger than 64 bit
fixed .incr_version() when ttl is None
added .pttl() method to the clients to support milli-second precision for ttl of a key
added .pexpire() method to the clients to support milli-second precision for setting expiry of a key
Fix typo in CHANGES.rst
Fix typo in CHANGES.rst
No code changes.
Fixed a typo in setup.cfg metadata preventing a successful release.
Prepare for the next release
Prepare for the next release
Removed support for Python 2.7 and 3.4.
Removed support for Django 2.0 and 2.1.
Added support for Python 3.8.
Added support for Django 2.2 and 3.0.
Changed msgpack-python soft dependency to msgpack.
Fixed .touch() method for sharded client.
Fixed prefix escaping for the sharded client.
Fixed .add() method to return a bool.
Add support and testing for Django 2.1 and Python 3.7. No actual code changes were required.
Add support and testing for Django 2.1 and Python 3.7. No actual code changes were required.
Add support for redis-py 3.0.
Add touch command.
- Pin redis version to 2.10.6
Pin redis version to 2.10.6
The deprecated feature of passing True as a timeout value is no longer supported.
Add testing and support for Django 2.0. No actual code changes were required.
Escape KEY_PREFIX and VERSION when used in glob expressions.
Improve handling timeouts less than 1ms.
Remove fakeredis support.
Add datetime, date, time, and timedelta serialization support to the JSON serializer.
The deprecated feature of passing True as a timeout value is no longer supported.
Fix add() with a negative timeout to not store key (it is immediately invalid).
Remove support for Django < 1.11.
Add support for atomic incr if key is not set.
Drop deprecated exception with typo ConnectionInterrumped. Use ConnectionInterrupted instead.
Drop deprecated exception with typo ConnectionInterrumped. Use ConnectionInterrupted instead.
Remove many workarounds related to old and not supported versions of django and redis-py.
Code cleaning and flake8 compliance fixes.
Add better impl for close method.
Fix compatibility warnings with python 3.6
Add the ability to enable write to replica servers when the primary server is not available.
Add the ability to enable write to replica servers when the primary server is not available.
Add itersize parameter to delete_pattern.
Fix incorrect behavior of clear() method.
Fix incorrect behavior of clear() method.
Remove undocumented and deprecated support for old connection string format.
Now only support Django 1.8 and above. Support for older versions has been dropped.
Remove undocumented and deprecated support for old connection string format.
Add support for PASSWORD option (useful when the password contains url unsafe characters).
Make the package compatible with fake redis.
Fix compatibility issues with latest django version (1.10).
Fix possible race condition on incr implementation using lua script (thanks to @prokaktus).
Fix possible race condition on incr implementation using lua script (thanks to @prokaktus).
- Fix minor ttl inconsistencies.
Fix minor ttl inconsistencies.
Fix timeout bug (thanks to @skorokithakis)
Fix timeout bug (thanks to @skorokithakis)
Add additional check for avoid wrong exception on get_redis_connection.
Add additional check for avoid wrong exception on get_redis_connection.
BREAKING CHANGE: improved compression support (make it more plugable).
Make redis client pluggable (thanks to @arnuschky)
Add version number inside python module (thanks to @BertrandBordage)
Fix clear method (thanks to @ostcar)
Add the ability to specify key prefix on delete and delete_pattern.
BREAKING CHANGE: improved compression support (make it more plugable).
Improved exception handling in herd client (thanks to @brandoshmando)
Improved exception handling in herd client (thanks to @brandoshmando)
Fix bug that not allows use generators on delete_many (thanks to @ostcar).
Remove obsolete code that makes hard dependency to mspack.
Add persist and expire methods.
Add persist and expire methods.
Remove old and broken dummy client.
Expose a redis lock method.
Add plugable serializers architecture (thanks to @jdufresne)
Add plugable serializers architecture (thanks to @jdufresne)
Add json serializer (thanks to @jdufresne)
Add msgpack serializer (thanks to @uditagarwal)
Implement delete_pattern using iter_scan for better performance (thanks to @lenzenmi)
BREAKING CHANGE: Now timeout=0 works as django specified (expires immediately)
Remove usage of deprecated get_cache method.
Added connection option SOCKET_CONNECT_TIMEOUT. [Jorge C. Leitão].
Replace setex and friends with set, because it now supports all need for atomic. updates (thanks to @23doors) (re revert changes from 3.8.x branch).
Fix django 1.8 compatibilities.
Fix django 1.9 compatibilities.
BREAKING CHANGE: Now timeout=0 works as django specified (expires immediately)
Now requires redis server >= 2.8
BREAKING CHANGE: redis_cache is no longer a valid package name
Backport django 1.8 fixes from master.
Backport django 1.8 fixes from master.
Minor fix on regular expression for old url notation.
Minor fix on regular expression for old url notation.
Revert some changes from 3.8.1 that are incompatible with redis server < 2.6.12
Revert some changes from 3.8.1 that are incompatible with redis server < 2.6.12
Fix documentation related to new url format.
Fix documentation related to new url format.
Fix documentation parts that uses now removed functions.
Fix invalid url transformation from old format (password was not set properly)
Replace setex and friends with set, because it now supports all need for atomic updates (thanks to @23doors).
BACKWARD INCOMPATIBLE CHANGE: use StrictRedis instead of Redis class of redis-py
Add compression support. (Thanks to @alanjds)
Change package name from redis_cache to django_redis.
Add backward compatibility layer for redis_cache package name.
BACKWARD INCOMPATIBLE CHANGE: use StrictRedis instead of Redis class of redis-py
Add redis dummy backend for development purposes. (Thanks to @papaloizouc)
Now use redis native url notation for connection string (the own connection string notation is also supported but is marked as deprecated).
Now requires redis-py >= 2.10.0
Remove deprecated raw_cache property from backend.
Add missing forward of version parameter from add() to set() function. (by @fellowshipofone)
Add missing forward of version parameter from add() to set() function. (by @fellowshipofone)
Fix missing imports on sentinel client (by @opapy).
Improve docs (by @dkingman).
Fix missing imports on sentinel client (by @opapy).
Connection closing improvements on sentinel client (by @opapy).
Backward incompatible change: now raises original exceptions instead of self defined.
Add support for django's KEY_FUNCTION and REVERSE_KEY_FUNCTION (by @teferi)
Accept float value for socket timeout.
Fix wrong behavior of DJANGO_REDIS_IGNORE_EXCEPTIONS with socket timeouts.
Backward incompatible change: now raises original exceptions instead of self defined.
Deprecate django 1.3.x support.
Add ttl method purposed to be included in django core.
Add iter_keys method that uses redis scan methods for memory efficient keys retrieval.
Add version keyword parameter to keys.
Deprecate django 1.3.x support.
Fix wrong import on sentinel client.
Fix wrong import on sentinel client.
Add pluggable connection factory.
Add pluggable connection factory.
Negative timeouts now works as expected.
Delete operation now returns a number of deleted items instead of None.
Nothing published for this version
Fixed redis-py < 2.9.0 incompatibilities
Fixed redis-py < 2.9.0 incompatibilities
Fixed runtests error with django 1.7
Now uses a django DEFAULT_TIMEOUT constant instead of True. Deprecation warning added for code that now uses True (unlikely).
Removed: stats module (should be replaced with an other in future)
New: experimental client for add support to redis-sentinel.
Now uses a django DEFAULT_TIMEOUT constant instead of True. Deprecation warning added for code that now uses True (unlikely).
Fix wrong forward of timeout on shard client.
Fix incr_version wrong behavior when using shard client (wrong client used for set new key).
Fix exception name from ConnectionInterrumped to ConnectionInterrupted maintaining an old exception class for backward compatibility (thanks Łukasz La
Fix exception name from ConnectionInterrumped to ConnectionInterrupted maintaining an old exception class for backward compatibility (thanks Łukasz Langa (@ambv))
Fix wrong behavior for "default" parameter on get method when DJANGO_REDIS_IGNORE_EXCEPTIONS is True (also thanks to Łukasz Langa (@ambv)).
Now added support for replication setups to default client (it still experimental because is not tested in production environments).
Merged SimpleFailoverClient experimental client (only for experiment with it, not ready for use in production)
Django 1.6 cache changes compatibility. Explicitly passing in timeout=None no longer results in using the default timeout.
Major code cleaning. (Thanks to Bertrand Bordage @BertrandBordage)
Bugfixes related to some index error on hashring module.
Nothing published for this version
Nothing published for this version
Fix python3 compatibility on utils module.
Fix python3 compatibility on utils module.
Add nx argument on set method for both clients (thanks to Kirill Zaitsev)
Add nx argument on set method for both clients (thanks to Kirill Zaitsev)
- Bug fixes on sharded client.
Bug fixes on sharded client.
Now reuse connection pool on massive use of get_cache method.
Now reuse connection pool on massive use of get_cache method.
Fixed python 2.6 compatibility.
Fixed python 2.6 compatibility.
Now on call close() not disconnect all connection pool.
Now on call close() not disconnect all connection pool.
Fixed incorrect exception message on LOCATION has wrong format. (Thanks to Yoav Weiss)
(Thanks to Yoav Weiss)
Helpers for access to raw redis connection.
Helpers for access to raw redis connection.
Ignore exceptions (same behavior as memcached backend)
Python 3.2+ support.
Code cleaning and refactor.
Ignore exceptions (same behavior as memcached backend)
Pluggable clients.
Unified connection string.
Bug fixes on keys and delete_pattern methods.
Bug fixes on keys and delete_pattern methods.
New delete_pattern method. Useful for delete keys using wildcard syntax.
New delete_pattern method. Useful for delete keys using wildcard syntax.
- Many bug fixes. - Client side sharding.
Many bug fixes.
Client side sharding.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →