MCPcopy Create free account
hub / github.com/F-Stack/f-stack / randomkeyCommand

Function randomkeyCommand

app/redis-6.2.6/src/db.c:737–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735}
736
737void randomkeyCommand(client *c) {
738 robj *key;
739
740 if ((key = dbRandomKey(c->db)) == NULL) {
741 addReplyNull(c);
742 return;
743 }
744
745 addReplyBulk(c,key);
746 decrRefCount(key);
747}
748
749void keysCommand(client *c) {
750 dictIterator *di;

Callers

nothing calls this directly

Calls 4

dbRandomKeyFunction · 0.85
addReplyNullFunction · 0.85
addReplyBulkFunction · 0.85
decrRefCountFunction · 0.85

Tested by

no test coverage detected