KvHaveCache is a HaveCache on top of a single mutable database file on disk using github.com/syndtr/goleveldb. It stores the blobref in binary as the key, and the blobsize in binary as the value. Access to the cache is restricted to one process at a time with a lock file. Close should be called to r
| 49 | // at a time with a lock file. Close should be called |
| 50 | // to remove the lock. |
| 51 | type KvHaveCache struct { |
| 52 | filename string |
| 53 | db *leveldb.DB |
| 54 | } |
| 55 | |
| 56 | func NewKvHaveCache(gen string) *KvHaveCache { |
| 57 | cleanCacheDir() |
nothing calls this directly
no outgoing calls
no test coverage detected