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

Method getConfiguredTtl

cachelib/object_cache/ObjectCache.h:482–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480 // 0 if object is nullptr
481 template <typename T>
482 static std::chrono::seconds getConfiguredTtl(
483 const std::shared_ptr<T>& object) {
484 if (object == nullptr) {
485 return std::chrono::seconds{0};
486 }
487 return getReadHandleRefInternal<T>(object)->getConfiguredTTL();
488 }
489
490 // Get the last access timestamp of the object
491 // @param object object shared pointer returned from ObjectCache APIs

Callers 3

testGetTtlMethod · 0.80
testUpdateTtlMethod · 0.80

Calls 1

getConfiguredTTLMethod · 0.45

Tested by 3

testGetTtlMethod · 0.64
testUpdateTtlMethod · 0.64