Add optional parameter pruneHook to EvictingCacheMap::set(..)
Summary: Inside `set()` we can do pruning, but it will happen with default pruneHook. Adding it as an optional param makes API more convenient. (Instead, the users of API could just call `setPruneHook(pruneHook)` before `set`, and then `setPruneHook(nullptr)` afterwards -- but it looks too ugly) Test Plan: ``` fbconfig -r folly/ && fbmake runtests ``` passes: ``` Summary (total time 60.11s): PASS: 1758 FAIL: 0 SKIP: 0 FATAL: 0 TIMEOUT: 0 ``` Reviewed By: njormrod@fb.com Subscribers: trunkagent, agartrell, njormrod, folly-diffs@ FB internal diff: D1665690 Tasks: 5551091 Signature: t1:1665690:1415391406:e4d2a956f9212aed70ab518159dbb19553764ce4
Showing
Please register or sign in to comment