MCPcopy Create free account
hub / github.com/facebook/CacheLib / allocate

Method allocate

cachelib/interface/tests/InterfaceTest.cpp:82–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 }
81
82 folly::coro::Task<Result<AllocatedHandle>> allocate(
83 Key key,
84 uint32_t size,
85 uint32_t creationTime,
86 uint32_t ttlSecs) override {
87 auto& allocated = allocatedItems_.emplace_back(
88 new TestCacheItem(key, size, creationTime, ttlSecs));
89 co_return ASSERT_OK(tryCreateHandle<AllocatedHandle>(*this, *allocated));
90 }
91
92 folly::coro::Task<UnitResult> insert(AllocatedHandle&& handle) override {
93 auto itemIt = findAllocatedItem(handle.get());

Callers 2

allocateAndInsertItemMethod · 0.45
CO_TEST_FFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected