Opened 6 months ago

Last modified 4 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, Mike Edmunds 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 (6)

comment:1 by amirreza, 6 months ago

Description: modified (diff)

comment:2 by Lily, 6 months ago

Triage Stage: UnreviewedAccepted

comment:3 by amirreza, 6 months ago

Has patch: set

comment:4 by Mike Edmunds, 4 months ago

Cc: Mike Edmunds added

comment:5 by Jacob Walls, 4 hours ago

Some implementation hints in #37153.

comment:6 by amirreza, 4 hours ago

hi 👋
i think my version would fulfill the implementation,
but for unknown reasons github has decided to suspend my account and they don't respond to my emails, so my PR is also suspended.
I'm ok if someone else takes this issue, since I don't know when i can get my account back

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