Code

Refactor cache_tree_update idiom from commit