1. A method for performing caching in an image-processing system, comprising: receiving a filtering query for resources in a cache; returning a subcache in response to the filtering query, wherein the subcache is a new subcache descending from the cache in tree of caches to which the cache and the subcache belong, and wherein returning the subcache comprises adding the new subcache to the tree of caches; and upon receiving a resource query for resources in the subcache, performing the filtering query on the cache, populating the subcache with addresses of resources returned by the filtering query until the resource query is satisfied, and returning available resources from the subcache in response to the resource query.
1. A method for performing caching in an image-processing system, comprising: receiving a filtering query for resources in a cache; returning a subcache in response to the filtering query, wherein the subcache is a new subcache descending from the cache in tree of caches to which the cache and the subcache belong, and wherein returning the subcache comprises adding the new subcache to the tree of caches; and upon receiving a resource query for resources in the subcache, performing the filtering query on the cache, populating the subcache with addresses of resources returned by the filtering query until the resource query is satisfied, and returning available resources from the subcache in response to the resource query. 2. The method of claim 1 , wherein the method further comprises: receiving a second filtering query for resources in the subcache; returning a second subcache in response to the second filtering query; and upon receiving a second resource query for resources from the second subcache, performing the second filtering query on the subcache, populating the second subcache with resources returned from the second filtering query until the resource query is satisfied, and returning available resources from the second subcache in response to the second resource query.