﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27048	Document that refresh_from_db() doesn't clear @cached_properties	Jarek Glowacki	nobody	"Should `cached_property`-decorated stuff get wiped when we call `.refresh_from_db()`?

I found [https://medium.com/@fdemmer/django-cached-property-on-models-f4673de33990#.vc5atqt0n this related article] on the matter.

From a usage perspective, it seems like we wouldn't ever want cached properties to persist through a `refresh_from_db()` call, as ideally we'd like to think `mymodel.refresh_from_db()` is shorthand synonymous to `mymodel = MyModel.objects.get(pk=mymodel.pk)`.

However, from an implementation perspective, maybe this would result in a rabbit hole that tries to pull through other stuff, like #26514.

Basically this ticket picks at:
   Note that only fields of the model are reloaded from the database. Other database dependent values such as annotations are not reloaded.`

I have a feeling this might be a conscious design decision, but in case it isn't, thoughts?"	Cleanup/optimization	closed	Documentation	dev	Normal	fixed	cached_property refresh_from_db		Ready for checkin	1	0	0	0	0	0
