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

Function moduleNotifyKeyUnlink

src/module.cpp:8584–8592  ·  view source on GitHub ↗

When a module key is deleted (in dbAsyncDelete/dbSyncDelete/dbOverwrite), it * will be called to tell the module which key is about to be released. */

Source from the content-addressed store, hash-verified

8582/* When a module key is deleted (in dbAsyncDelete/dbSyncDelete/dbOverwrite), it
8583* will be called to tell the module which key is about to be released. */
8584void moduleNotifyKeyUnlink(robj *key, robj *val) {
8585 if (val->type == OBJ_MODULE) {
8586 moduleValue *mv = (moduleValue*)ptrFromObj(val);
8587 moduleType *mt = mv->type;
8588 if (mt->unlink != NULL) {
8589 mt->unlink(key,mv->value);
8590 }
8591 }
8592}
8593
8594/* --------------------------------------------------------------------------
8595 * Modules API internals

Callers 3

dbOverwriteCoreMethod · 0.85
syncDeleteMethod · 0.85
asyncDeleteMethod · 0.85

Calls 1

ptrFromObjFunction · 0.85

Tested by

no test coverage detected