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

Function NewPersistentCache

src/leveldb/persistent_cache/persistent_cache_impl.cc:359–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359Status NewPersistentCache(const PersistentCacheConfig& config,
360 std::shared_ptr<PersistentCache>* cache) {
361 if (!cache) {
362 return Status::IOError("invalid argument cache");
363 }
364 std::shared_ptr<PersistentCacheImpl::Statistics> stats{new PersistentCacheImpl::Statistics};
365 auto pcache = std::make_shared<PersistentCacheImpl>(config, stats);
366 Status s = pcache->Open();
367
368 if (!s.ok()) {
369 return s;
370 }
371
372 *cache = pcache;
373 return s;
374}
375} // namespace leveldb

Callers

nothing calls this directly

Calls 3

IOErrorFunction · 0.50
OpenMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected