Opened 7 hours ago

Last modified 3 hours ago

#36830 assigned New feature

Store the cache alias on the cache backend instance

Reported by: amirreza Owned by: amirreza
Component: Core (Cache system) Version: dev
Severity: Normal Keywords: cache
Cc: amirreza Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by amirreza)

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

Change History (3)

comment:1 by amirreza, 7 hours ago

Description: modified (diff)

comment:2 by Lily, 6 hours ago

Triage Stage: UnreviewedAccepted

comment:3 by amirreza, 3 hours ago

Has patch: set
Note: See TracTickets for help on using tickets.
Back to Top