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

Method extendTtl

cachelib/object_cache/ObjectCache.h:539–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537 // @return boolean indicating whether TTL was successfully extended
538 template <typename T>
539 bool extendTtl(std::shared_ptr<T>& object, std::chrono::seconds ttl) {
540 if (object == nullptr) {
541 return false;
542 }
543 return getWriteHandleRefInternal<T>(object)->extendTTL(ttl);
544 }
545
546 // Mutate object and update the object size
547 // When size-awareness is enabled, users must call this API to mutate the

Callers 2

testUpdateTtlMethod · 0.80

Calls 1

extendTTLMethod · 0.80

Tested by 2

testUpdateTtlMethod · 0.64