[Django] #36830: Store the cache alias on the cache backend instance

3 views
Skip to first unread message

Django

unread,
Dec 26, 2025, 11:44:48 AM12/26/25
to django-...@googlegroups.com
#36830: Store the cache alias on the cache backend instance
-----------------------------------------------+--------------------------
Reporter: amirreza | Owner: amirreza
Type: New feature | Status: assigned
Component: Core (Cache system) | Version: dev
Severity: Normal | Keywords: cache
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-----------------------------------------------+--------------------------
this has been discussed in the new-features repository
https://github.com/django/new-features/issues/95

as mentioned other parts of django (orm and django.tasks) are already
doing this
and it also greatly helps 3rd party libraries that work with django's
cache framework, `django-redis`, `django-valkey` and `django-debug-
toolbar` to name a few

considering the size of this proposal, i am not sure if this requires a
dep, if so, please let me know and i'll start working on one
--
Ticket URL: <https://code.djangoproject.com/ticket/36830>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 26, 2025, 11:48:22 AM12/26/25
to django-...@googlegroups.com
#36830: Store the cache alias on the cache backend instance
-------------------------------------+-------------------------------------
Reporter: amirreza | Owner: amirreza
Type: New feature | Status: assigned
Component: Core (Cache system) | Version: dev
Severity: Normal | Resolution:
Keywords: cache | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by amirreza:

Old description:

> this has been discussed in the new-features repository
> https://github.com/django/new-features/issues/95
>
> as mentioned other parts of django (orm and django.tasks) are already
> doing this
> and it also greatly helps 3rd party libraries that work with django's
> cache framework, `django-redis`, `django-valkey` and `django-debug-
> toolbar` to name a few
>
> considering the size of this proposal, i am not sure if this requires a
> dep, if so, please let me know and i'll start working on one

New description:

this has been discussed in the new-features repository
https://github.com/django/new-features/issues/95

this proposal will change how cache backends are instantiated, so the
instance will be aware of the alias name configured for each backend

it would require the existing backends to be updated to match the new
syntax
3rd party libraries would probably need to update as well

as mentioned other parts of django (orm and django.tasks) are already
doing this
and it also greatly helps 3rd party libraries that work with django's
cache framework, `django-redis`, `django-valkey` and `django-debug-
toolbar` to name a few

considering the size of this proposal, i am not sure if this requires a
dep, if so, please let me know and i'll start working on one

--
--
Ticket URL: <https://code.djangoproject.com/ticket/36830#comment:1>

Django

unread,
Dec 26, 2025, 12:15:26 PM12/26/25
to django-...@googlegroups.com
#36830: Store the cache alias on the cache backend instance
-------------------------------------+------------------------------------
Reporter: amirreza | Owner: amirreza
Type: New feature | Status: assigned
Component: Core (Cache system) | Version: dev
Severity: Normal | Resolution:
Keywords: cache | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by Lily):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/36830#comment:2>

Django

unread,
Dec 26, 2025, 3:35:20 PM12/26/25
to django-...@googlegroups.com
#36830: Store the cache alias on the cache backend instance
-------------------------------------+------------------------------------
Reporter: amirreza | Owner: amirreza
Type: New feature | Status: assigned
Component: Core (Cache system) | Version: dev
Severity: Normal | Resolution:
Keywords: cache | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by amirreza):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36830#comment:3>
Reply all
Reply to author
Forward
0 new messages