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

Function lookupKeyWriteWithFlags

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

Lookup a key for write operations, and as a side effect, if needed, expires * the key if its TTL is reached. * * Returns the linked value object if the key exists or NULL if the key * does not exist in the specified DB. */

Source from the content-addressed store, hash-verified

158 * Returns the linked value object if the key exists or NULL if the key
159 * does not exist in the specified DB. */
160robj *lookupKeyWriteWithFlags(redisDb *db, robj *key, int flags) {
161 expireIfNeeded(db,key);
162 return lookupKey(db,key,flags);
163}
164
165robj *lookupKeyWrite(redisDb *db, robj *key) {
166 return lookupKeyWriteWithFlags(db, key, LOOKUP_NONE);

Callers 2

lookupKeyWriteFunction · 0.85
RM_OpenKeyFunction · 0.85

Calls 2

expireIfNeededFunction · 0.85
lookupKeyFunction · 0.85

Tested by

no test coverage detected