A method for performing an operation on a hierarchical data tree
comprising retrieving data from an anchor node in the tree and a
plurality of neighboring nodes each potentially affected by the
operation. A cache is queried for a key representing the anchor node and
the plurality of neighboring nodes based on the retrieved data. If the
query finds a match, the retrieved data is replaced with cached data. If
the query does not find a match, the operation is performed on the
retrieved data to generate post-operation data, the retrieved data is
replaced with the post-operation data and the post-operation data is
stored in the cache based on the key.