Path-caching mechanism to improve performance of path-related operations in a repository
First Claim
1. A computer-implemented method of processing path-based operations, the method comprising:
- in response to a request to determine a complete path to a requestor-specified first node, and upon determining that a path cache does not contain a first cache entry that specifies a complete path from a root node to the first node, which is an immediate child of a second node in a hierarchy of nodes, determining whether the path cache contains a second cache entry that specifies a complete path from the root node to the second node;
upon determining that the path cache does not contain the second cache entry, automatically determining a pathname that specifies the complete path from the root node to the second node and inserting, into the path cache, a particular cache entry that (a) corresponds to the second node and (b) indicates the pathname for the second node;
storing, in the particular cache entry, a first value that indicates a quantity of nodes that descend from the second node in the hierarchy; and
in response to a determination that at least one cache entry is to be evicted from the path cache, selecting the particular cache entry for eviction from the path cache based at least in part on the first value;
wherein the method is performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for processing path-based database operations is provided. According to one aspect, a path cache is maintained. For each hierarchical node that is traversed during a path-determining operation, it is determined whether a cache entry corresponding to that node is already contained in the path cache. If such a cache entry is already contained in the path cache, then the path indicated in that cache entry is used to complete the pathname for the node for which the operation is being performed. As a result, hierarchically higher nodes do not need to be traversed to complete the operation. Alternatively, if such a cache entry is not already contained in the path cache, then a cache entry for the node currently being traversed is generated and inserted into the path cache for use in subsequent path-determining operations.
-
Citations
20 Claims
-
1. A computer-implemented method of processing path-based operations, the method comprising:
-
in response to a request to determine a complete path to a requestor-specified first node, and upon determining that a path cache does not contain a first cache entry that specifies a complete path from a root node to the first node, which is an immediate child of a second node in a hierarchy of nodes, determining whether the path cache contains a second cache entry that specifies a complete path from the root node to the second node; upon determining that the path cache does not contain the second cache entry, automatically determining a pathname that specifies the complete path from the root node to the second node and inserting, into the path cache, a particular cache entry that (a) corresponds to the second node and (b) indicates the pathname for the second node; storing, in the particular cache entry, a first value that indicates a quantity of nodes that descend from the second node in the hierarchy; and in response to a determination that at least one cache entry is to be evicted from the path cache, selecting the particular cache entry for eviction from the path cache based at least in part on the first value; wherein the method is performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A volatile or non-volatile non-transitory computer-readable storage medium storing one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform steps comprising:
-
in response to a request to determine a complete path to a requestor-specified first node, and upon determining that a path cache does not contain a first cache entry that specifies a complete path from a root node to the first node, which is an immediate child of a second node in a hierarchy of nodes, determining whether the path cache contains a second cache entry that specifies a complete path from the root node to the second node; upon determining that the path cache does not contain the second cache entry, automatically determining a pathname that specifies the complete path from the root node to the second node and inserting, into the path cache, a particular cache entry that (a) corresponds to the second node and (b) indicates the pathname for the second node; storing, in the particular cache entry, a first value that indicates a quantity of nodes that descend from the second node in the hierarchy; and in response to a determination that at least one cache entry is to be evicted from the path cache, selecting the particular cache entry for eviction from the path cache based at least in part on the first value. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification