Opened 2 years ago
Last modified 2 years ago
#34764 closed New feature
Add support for Clusterized Redis deployments — at Version 1
| Reported by: | Vsevolod Timchenko | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Cache system) | Version: | 4.2 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The RedisCacheClient is explicitly initialized with the standard Redis client from the redis-py library:
`
import redis
self._lib = redis
...
self._client = self._lib.Redis
`
To work with clusterized deployments another class, RedisCluster, has to be used. It offers support for cluster features and peculiarities, i.e. smart retries and refreshes on MOVED errors as well as node discovery.
Relevant piece of code:
https://github.com/django/django/blob/main/django/core/cache/backends/redis.py#L39