private void cachePeeledState(Ref oldLeaf, Ref newLeaf) {
// TODO(spearce) Use an ExecutorService here
try {
RepositoryKey repo = repository.getRepositoryKey();
RefKey key = RefKey.create(repo, newLeaf.getName());
RefData oldData = ((DhtRef) oldLeaf).getRefData();
RefData newData = ((DhtRef) newLeaf).getRefData();
db.ref().compareAndPut(key, oldData, newData);
} catch (TimeoutException e) {
// Ignore a timeout here, we were only trying to update
// a cached value to save peeling costs in the future.