#28268: Feature: Clear cached_property on related DB operations.
-------------------------------------+-------------------------------------
Reporter: Özer Sahin | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.11
(models, ORM) |
Severity: Normal | Resolution:
Keywords: cached_property | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Özer Sahin):
Yes, so Django should automatically take care of those operations in the
background. Of course I could write a mixin or something similar, but that
would bring overhead to the project.
Pydanny has a module, that is a configurable property:
https://github.com/pydanny/cached-property
But that does not cover that case, I already asked and he referred me to
the Django project.
I am not sure, if I could write an app that does all that. I thought it
would be convenient if the cached_property could be called with kwargs
like @cached_property(delete_on_save=True,
delete_when_models_change=[ModelA, ModelB]).
Thank you for your time btw, really appreciate it!
--
Ticket URL: <https://code.djangoproject.com/ticket/28268#comment:6>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.bc696605fc5e0ea534a8b6730eab8a64%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.