#28268: Feature: Clear cached_property on related DB operations. -------------------------------------+------------------------------------- Reporter: oesah | Owner: nobody Type: New | Status: new feature | Component: Database | Version: 1.11 layer (models, ORM) | Severity: Normal | Keywords: cached_property Triage Stage: | Has patch: 0 Unreviewed | Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------+------------------------------------- Hey,
I am wondering, why it wouldn't be smarter to let the decorator (somehow) clear related caches whenever a related model changes. Use Case: I have a big model with many related models and I need to filter them for a ListView Page. To display those values I would use cached_property for data from other models like images. Since the related instances have not changed, we could use the cached_property. Now if we upload a new image, a signal could clear the cached_property used in the other model. The same goes for update, delete or other relevant operations. That way the system would always be up to date, but max out the potential of caching where ever it makes sense. Is that clear? I am not an expert like you, but since I am currently learning about all this, I was curious why this hasn't been implemented (yet). -- Ticket URL: <https://code.djangoproject.com/ticket/28268> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/048.5a0553d20acf270b3c25702909686b6e%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.