First, it seems that this never actually gets used on our projects, or in the CMS internally. That is almost a good standalone reason to remove it.
Secondly, if it was being used, it would be unreliable, because a page's URL can change without the save method being called on it. For example, if the parent changes, or the parent's slug changes, or if something is changed with queryset.update, the URL changes but save is not called. I do not think it is a good idea to attempt to catch all of these cases.
Once it is incorrect, it is impossible to detect the case in which it is incorrect[1]. It would only be correct again once get_absolute_url had been called without cached=True (this will update cached_url - which is slightly surprising behaviour!). It so happens that get_absolute_urlis likely to be called on it at some point, but that is not guaranteed - i.e. the breakage is quiet and unpredictable, the kind I like least.
[1] By checking to see if it was stale, you'd have to compare it with the result of get_absolute_url(cached=False), which negates having a cached URL at all.
First, it seems that this never actually gets used on our projects, or in the CMS internally. That is almost a good standalone reason to remove it.
Secondly, if it was being used, it would be unreliable, because a page's URL can change without the
save
method being called on it. For example, if the parent changes, or the parent's slug changes, or if something is changed withqueryset.update
, the URL changes butsave
is not called. I do not think it is a good idea to attempt to catch all of these cases.Once it is incorrect, it is impossible to detect the case in which it is incorrect[1]. It would only be correct again once
get_absolute_url
had been called withoutcached=True
(this will updatecached_url
- which is slightly surprising behaviour!). It so happens thatget_absolute_url
is likely to be called on it at some point, but that is not guaranteed - i.e. the breakage is quiet and unpredictable, the kind I like least.[1] By checking to see if it was stale, you'd have to compare it with the result of
get_absolute_url(cached=False)
, which negates having a cached URL at all.