- Added the ability to pass redis username in the cache options (#657)
- RedisCache does not attempt to close clients which have not been initialized. (#796)
- Add sorted set operations (zadd, zrange, zrem, etc.) and mixins for RedisCache (#797)
- Centralize configuration in pyproject.toml, drop EoL Python & Django versions, and add support & testing for modern Python & Django versions. (#820)
- Provide TypeVar defaults & provide initial typing for RedisCache. (#829)
- Fix IntEnum encoding (#602)
- Fix incorrect Redis typing that relied on the legacy 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)
- Drop support for Django 5.0 (EOL) (#779)
- Clean & organize ruff config (#781)
- Replace black with ruff format (#782)
- Update RedisCache.close to not forward kwargs to the client implementation. (#788)
- Rename 'name' parameter to 'key' in all sorted set methods for better consistency with Redis terminology (#811)
- Fix hash method parameters: rename 'name' → 'key', 'key' → 'field' to align with Redis/Valkey terminology. Add version parameter to hlen() and hkeys(). Fix make_key() to only apply to hash key, not fields. (#812)
- pre-commit autoupdate (#819)
- Use from __future__ import annotations to postpone evaluation of annotations. (#823)
- Increase mypy strictness, fix typing configuration, and fix type errors. (#824)
- This change updates the compose configuration, and moves it to tests directory as it is only for testing. (#825)
- Remove code handling unsupported Django versions (#826)
- Increase mypy type coverage & update strictness overrides to only target specific modules (#827)
- 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)
- Connection factory goes to cache options (#680)
- Added note in docs for correctly configuring hiredis parser when using redis-py version 5. (#677)
- Add support for django 4 (#627)
- Access 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)
- Skipping pickle serializer test for django >= 4.2 (#646)
- Speed up deleting multiple keys by a pattern with pipelines and larger itersize (#609)
- Print full exception traceback when logging ignored exceptions (#611)
- Fix mypy linting (#626)
- Added support for python 3.11 (#633)
- Fix CI, running tox<4 to still support Python 3.6. (#645)
- Dropped support for django 2.2 and 3.1 (#649)
- Run actions & tox against Django 4..2 (#668)
- Block use with broken redis-py 4.0.0 and 4.0.1 (#542)
- Add Python 3.10 to CI (#536)
- Configured
towncrierto generate the changelog. (#548) - Added
django_redis.compressors.zstd.ZStdCompressorto providepyzstdcache value compression. (#551) - Change pickle default version to Python default instead of highest version. (#555)
- Add
hiredisextra dependency to requestredis[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)
- Clarify redis primary name in sentinel documentation. (#529)
- Add documentation on configuring self signed SSL certificates. (#559)
- 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 isNoneor when the number is larger than 64 bit - fixed
.incr_version()when ttl isNone - 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
- No code changes.
- Fixed a typo in setup.cfg metadata preventing a successful release.
- The project has moved to Jazzband. This is the first release under the new organization. The new repository URL is https://github.com/jazzband/django-redis.
- Removed support for end-of-life Django < 2.2.
- Removed support for unmaintained redis-py 2.X.
- Changed uses of deprecated
smart_text()tosmart_str(). - Fixed deprecation warning with the msgpack serializer.
- The
.touch()method now uses the default timeout, to cache forever passNone. - Subclasses of
JSONSerializercan now override theencoder_classattribute to change the JSON encoder. It defaults toDjangoJSONEncoder. - Fixed
DefaultClient.set()to work with emptyPipeline. - The
thread_localparameter is now forwarded to the Redis client.
- 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 for redis-py 3.0.
- Add touch command.
- Pin redis version to 2.10.6
- Add testing and support for Django 2.0. No actual code changes were required.
- Escape
KEY_PREFIXandVERSIONwhen 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
Trueas 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.
- 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
closemethod. - Fix compatibility warnings with python 3.6
- Add the ability to enable write to replica servers when the primary server is not available.
- Add
itersizeparameter todelete_pattern.
- Fix incorrect behavior of
clear()method.
- 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
PASSWORDoption (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 minor ttl inconsistencies.
- Fix timeout bug (thanks to @skorokithakis)
- Add additional check for avoid wrong exception on
get_redis_connection.
- 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)
- Fix bug that not allows use generators on delete_many (thanks to @ostcar).
- Remove obsolete code that makes hard dependency to mspack.
- Add
persistandexpiremethods. - Remove old and broken dummy client.
- Expose a redis lock method.
- 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)
- Remove usage of deprecated
get_cachemethod. - Added connection option SOCKET_CONNECT_TIMEOUT. [Jorge C. Leitão].
- Replace
setexand 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_cacheis no longer a valid package name
- Backport django 1.8 fixes from master.
- 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
- 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).
- 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_cacheproperty from backend.
- Add missing forward of version parameter from
add()toset()function. (by @fellowshipofone)
- Improve docs (by @dkingman).
- Fix missing imports on sentinel client (by @opapy).
- Connection closing improvements on sentinel client (by @opapy).
- Add support for django's
KEY_FUNCTIONandREVERSE_KEY_FUNCTION(by @teferi) - Accept float value for socket timeout.
- Fix wrong behavior of
DJANGO_REDIS_IGNORE_EXCEPTIONSwith socket timeouts. - Backward incompatible change: now raises original exceptions instead of self defined.
- 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.
- Add pluggable connection factory.
- Negative timeouts now works as expected.
- Delete operation now returns a number of deleted items instead of None.
- Fixed redis-py < 2.9.0 incompatibilities
- Fixed runtests error with django 1.7
- 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_TIMEOUTconstant instead ofTrue. Deprecation warning added for code that now usesTrue(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 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.
- Add SOCKET_TIMEOUT attribute to OPTIONS (thanks to @eclipticplane)
- Changed default behavior of connection error exceptions: now by default
- raises exception on connection error is occurred.
Thanks to Mümin Öztürk:
- cache.add now uses setnx redis command (atomic operation)
- cache.incr and cache.decr now uses redis incrby command (atomic operation)
- Fix python3 compatibility on utils module.
- Add nx argument on set method for both clients (thanks to Kirill Zaitsev)
- Bug fixes on sharded client.
- Now reuse connection pool on massive use of
get_cachemethod.
- Fixed python 2.6 compatibility.
- Now on call close() not disconnect all connection pool.
- Fixed incorrect exception message on LOCATION has wrong format.
- (Thanks to Yoav Weiss)
- Helpers for access to raw redis connection.
- Python 3.2+ support.
- Code cleaning and refactor.
- Ignore exceptions (same behavior as memcached backend)
- Pluggable clients.
- Unified connection string.
- Bug fixes on
keysanddelete_patternmethods.
- Remove duplicate check if key exists on
incrmethod. - Fix incorrect behavior of
delete_patternwith sharded client.
- New
delete_patternmethod. Useful for delete keys using wildcard syntax.
- Many bug fixes.
- Client side sharding.