#30517 closed New feature (wontfix)
Add Redis cache backend.
Reported by: | Dulmandakh | Owned by: | nobody |
---|---|---|---|
Component: | Core (Cache system) | Version: | dev |
Severity: | Normal | Keywords: | redis cache |
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 )
I think that it would be best to have built-in support for Redis caching in Django, as it's getting more popular and has other use cases than just caching. And I found that most of the features overlap with memcached. So I think that it might be better to refactor BaseMemcachedCache to be base for KV engines, and use it for both Memcached and Redis, to reduce code duplication.
I would like to start discussion about best approach adding Redis support into Django. Also I can work on this if approved.
Change History (6)
comment:1 by , 5 years ago
Keywords: | redis added |
---|
comment:2 by , 5 years ago
Description: | modified (diff) |
---|
comment:3 by , 5 years ago
Summary: | Base class for Key Value engines for caching → refactor BaseMemcachedCache to be a base class for KV engines |
---|
comment:4 by , 5 years ago
Keywords: | cache added |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Summary: | refactor BaseMemcachedCache to be a base class for KV engines → Add Redis cache backend. |
Type: | Cleanup/optimization → New feature |
comment:6 by , 5 years ago
It's worth quoting Aymeric's post on the mailing list:
To move this forwards, my suggestion would be to write a DEP, to flesh out the rationale for a built-in solution, and to focus on the breadth of functionality the built-in backend would support. My preference would be a basic set of features, like the other cache backends. I believe that's what django-redis-cache does. This will leave room for third-party packages like django-redis to provide more advanced features. To give a concrete example, like other cache and database backends, a redis backend could provide persistent connections but not implement a connection pool. Until now Django has left the management of connection pools to third-party packages.
Thanks for this proposition. There already exists django-redis-cache 3rd party package with a Redis cache backend for Django. I don't think that we should move it into core. You can try to start a discussion on the django-developers mailing list if you feel that we can reach a different consensus.