Opened 2 years ago
Last modified 2 years ago
#34764 closed New feature
Add support for Clusterized Redis deployments — at Version 2
| 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
Redis class that I propose to support:
https://github.com/redis/redis-py/blob/master/redis/cluster.py#L431
Change History (2)
comment:1 by , 2 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 2 years ago
| Description: | modified (diff) |
|---|