Open
Description
:touch delegates to the belongs_to annotation for the parent, so touching cascades to all children (the performance of this for deep trees isn't currently optimal).
So, when a parent is updated it passes on the timestamp change to its children (descendants?).
I'd like the reverse behaviour, with an updated child passing its timestamp changes up to all of its ancestors. Something like this:
after_save :touch_ancestors_for_cache_expiry
def touch_ancestors_for_cache_expiry
ancestors.to_a.each(&:touch)
end
Would it make sense to support both of these in the has_closure_tree
call?