#35405: Use @cached_property for FieldCacheMixin cache key
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Adam
Type: | Johnson
Cleanup/optimization | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by nessita <124304+nessita@…>):
* resolution: => fixed
* status: assigned => closed
Comment:
In [changeset:"b9838c65ec2fee36c1fd0d46494ba44da27a9b34" b9838c65]:
{{{#!CommitTicketReference repository=""
revision="b9838c65ec2fee36c1fd0d46494ba44da27a9b34"
Fixed #35405 -- Converted get_cache_name into a cached property in
FieldCacheMixin.
FieldCacheMixin is used by related fields to track their cached values.
This work migrates get_cache_name() to be a cached property to optimize
performance by reducing unnecessary function calls when working with
related fields, given that its value remains constant.
Co-authored-by: Simon Charette <[email protected]>
Co-authored-by: Sarah Boyce <[email protected]>
Co-authored-by: Natalia <[email protected]>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35405#comment:7>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/0107018f9c98402e-69795f02-532e-4879-9dcd-c94564780f91-000000%40eu-central-1.amazonses.com.