Cache tree ObjectId's too
The caching part is experimental. We explicitly leave it up to
the garbage collector when to recycle git objects. After trying
this practically we will se what is best. The upside is that
rescanning the history for a certain resource is very quick when
data is still in the cache (tens of milliseconds), which is very
good for interactivity. When memory is tight we go to disk and
fetch the data, which could take a couple of seconds on a large
repo.
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>