MCPcopy Create free account
hub / github.com/catboost/catboost / Erase

Method Erase

library/cpp/cache/thread_safe_cache.h:83–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 }
82
83 void Erase(TArgs... args) {
84 Key key = Callbacks.GetKey(args...);
85 if (!Contains(key)) {
86 return;
87 }
88 TWriteGuard w(Mutex);
89 typename TInternalCache::TIterator i = Cache.Find(key);
90 if (i == Cache.End()) {
91 return;
92 }
93 Cache.Erase(i);
94 }
95
96 bool Contains(const Key& key) const {
97 TReadGuard r(Mutex);

Callers 1

EraseMethod · 0.45

Calls 5

EraseFunction · 0.85
ContainsFunction · 0.50
GetKeyMethod · 0.45
FindMethod · 0.45
EndMethod · 0.45

Tested by

no test coverage detected