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. */
| 247 | * Returns the linked value object if the key exists or NULL if the key |
| 248 | * does not exist in the specified DB. */ |
| 249 | robj *lookupKeyWriteWithFlags(redisDb *db, robj *key, int flags) { |
| 250 | expireIfNeeded(db,key); |
| 251 | robj *o = lookupKey(db,key,flags|LOOKUP_UPDATEMVCC); |
| 252 | return o; |
| 253 | } |
| 254 | |
| 255 | robj *lookupKeyWrite(redisDb *db, robj *key) { |
| 256 | return lookupKeyWriteWithFlags(db, key, LOOKUP_NONE); |
no test coverage detected