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

Method setTotalObjectSizeLimit

cachelib/object_cache/ObjectCache.h:455–461  ·  view source on GitHub ↗

Update the total object size limit used by the size controller. The limit must be positive and takes effect when the size controller next runs. Returns false if no size controller is active for this cache (i.e., objectSizeTrackingEnabled is false or sizeControllerIntervalMs == 0), or if totalObjectSizeLimit is zero.

Source from the content-addressed store, hash-verified

453 // objectSizeTrackingEnabled is false or sizeControllerIntervalMs == 0),
454 // or if totalObjectSizeLimit is zero.
455 bool setTotalObjectSizeLimit(size_t totalObjectSizeLimit) {
456 if (totalObjectSizeLimit == 0 || sizeController_ == nullptr) {
457 return false;
458 }
459 sizeController_->setTotalObjectSizeLimit(totalObjectSizeLimit);
460 return true;
461 }
462
463 // Get the expiry timestamp of the object
464 // @param object object shared pointer returned from ObjectCache APIs

Callers 2

TESTFunction · 0.45

Calls

no outgoing calls

Tested by 2

TESTFunction · 0.36