MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / emergencyFreeCache

Method emergencyFreeCache

src/StorageCache.cpp:227–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227void StorageCache::emergencyFreeCache() {
228 std::unique_lock<fastlock> ul(m_lock);
229 dict *d = m_pdict;
230 m_pdict = nullptr;
231 if (d != nullptr) {
232 g_pserver->asyncworkqueue->AddWorkFunction([d]{
233 dictRelease(d);
234 });
235 }
236}

Callers 1

disableKeyCacheMethod · 0.80

Calls 2

AddWorkFunctionMethod · 0.80
dictReleaseFunction · 0.70

Tested by

no test coverage detected