MCPcopy Create free account
hub / github.com/baidu/tera / Insert

Method Insert

src/leveldb/persistent_cache/persistent_cache_metadata.cc:76–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76FileInfo* PersistentCacheMetaData::Insert(const Slice& key, CacheFile* cache_file) {
77 auto finfo = InsertWithoutPutDb(key, cache_file->cacheid());
78 if (finfo) {
79 db_->Put({}, key, cache_file->Path());
80 }
81 return finfo;
82}
83
84bool PersistentCacheMetaData::Lookup(const Slice& key, uint64_t* cache_id) {
85 FileInfo lookup_key(key, 0);

Callers 2

AddCacheFileMethod · 0.45
InsertWithoutPutDbMethod · 0.45

Calls 3

cacheidMethod · 0.80
PutMethod · 0.45
PathMethod · 0.45

Tested by

no test coverage detected