mirror of
https://github.com/fluencelabs/redis
synced 2025-06-13 09:11:20 +00:00
Module API for controlling LRU and LFU, and OpenKey without TOUCH
Some commands would want to open a key without touching it's LRU/LFU similarly to the OBJECT or DEBUG command do. Other commands may want to implement logic similar to what RESTORE does (and in the future MIGRATE) and get/set the LRU or LFU.
This commit is contained in:
8
src/db.c
8
src/db.c
@ -151,9 +151,13 @@ robj *lookupKeyRead(redisDb *db, robj *key) {
|
||||
*
|
||||
* Returns the linked value object if the key exists or NULL if the key
|
||||
* does not exist in the specified DB. */
|
||||
robj *lookupKeyWrite(redisDb *db, robj *key) {
|
||||
robj *lookupKeyWriteWithFlags(redisDb *db, robj *key, int flags) {
|
||||
expireIfNeeded(db,key);
|
||||
return lookupKey(db,key,LOOKUP_NONE);
|
||||
return lookupKey(db,key,flags);
|
||||
}
|
||||
|
||||
robj *lookupKeyWrite(redisDb *db, robj *key) {
|
||||
return lookupKeyWriteWithFlags(db, key, LOOKUP_NONE);
|
||||
}
|
||||
|
||||
robj *lookupKeyReadOrReply(client *c, robj *key, robj *reply) {
|
||||
|
Reference in New Issue
Block a user