camput: flatcache TODO.

Change-Id: I4e2368f8e22d5aa71bee8f5319f59444f3c0e638
This commit is contained in:
Brad Fitzpatrick 2012-12-31 13:53:44 -08:00
parent 519c46a388
commit 57a60aa944
1 changed files with 2 additions and 0 deletions

View File

@ -173,6 +173,7 @@ func (c *FlatStatCache) AddCachedPutResult(pwd, filename string, fi os.FileInfo,
return
}
}
// TODO: flocking. see leveldb-go.
c.af.Seek(0, os.SEEK_END)
c.af.Write([]byte(fmt.Sprintf("%s\t%s\t%s/%d\n", key, val.Fingerprint, val.Result.BlobRef.String(), val.Result.Size)))
}
@ -233,6 +234,7 @@ func (c *FlatHaveCache) NoteBlobExists(br *blobref.BlobRef) {
return
}
}
// TODO: flocking. see leveldb-go.
c.af.Seek(0, os.SEEK_END)
c.af.Write([]byte(fmt.Sprintf("%s\n", k)))
}