tree:

cache(tree, [cache])

Caches values from tree. If a cache is provided, the cached values will be stored in that tree; if no cache is provided, the values will be stored in an in-memory tree.