1. A method for performing an operation on a hierarchical data tree, comprising: visiting an anchor node in the tree; retrieving data from the anchor node and a plurality of neighboring nodes each potentially affected by the operation; querying a cache for a key representing the anchor node and the plurality of neighboring nodes in a pre-operation condition based on the retrieved data, wherein the cache stores pre-operation/post-operation data pairs; if the query finds a match, replacing the pre-operation retrieved data with cached post-operation data; and if the query does not find a match, performing the operation on the pre-operation retrieved data to generate post-operation data, replacing the pre-operation retrieved data with the post-operation data and storing the post-operation data in the cache with the associated pre-operation retrieved data.