#37156: Properly implement async Redis methods
-------------------------------------+-------------------------------------
Reporter: Johannes Maron | Owner: (none)
Type: New feature | Status: closed
Component: Core (Cache system) | Version: 6.0
Severity: Normal | Resolution:
| needsnewfeatureprocess
Keywords: redis, asyncio, | Triage Stage:
async | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):
* resolution: => needsnewfeatureprocess
* status: new => closed
* type: Cleanup/optimization => New feature
Comment:
Thanks everyone for the discussion. I have read all the comments and did
some research to gather context.
My view is that this is ultimately a new feature request, regardless of
whether it requires changes to Django's public API. The proposal is not
simply an internal optimization; it would introduce a distinct
implementation strategy with different connection-management constraints
and trade-offs. This is a big change with non-trivial side effects.
I also agree with Carlton that framing arguments in terms of what "core
devs" do or do not want is not particularly helpful. Django is a
community-driven project, and proposals are evaluated on their technical
merits, maintenance costs, and alignment with the project's goals rather
than on the preferences of any particular group.
Stepping back, I'm not yet convinced that changing the existing
`RedisCache` backend is the right direction. The current implementation
already provides an async API, and the discussion so far has not
established a clear benefit that would justify the additional complexity
of maintaining separate sync and async Redis implementations.
If there is a genuine need for a cache backend optimized specifically for
ASGI deployments and native asyncio Redis connections, I firmly believe
that a separate backend (in a third party app at firtst_ may be a cleaner
approach. That would allow ASGI users to opt into a different set of
trade-offs without introducing additional complexity or behavioral
differences into Django's built-in `RedisCache` backend, which continues
to support both WSGI and ASGI environments.
--
Ticket URL: <https://code.djangoproject.com/ticket/37156#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019ebc6e3a45-23857cc9-a805-4c2c-9cc1-3d644203661d-000000%40eu-central-1.amazonses.com.