Add cache to tree