mirror of
https://github.com/fluencelabs/redis
synced 2025-06-12 08:41:21 +00:00
Initial support for key expire times with millisecond resolution. RDB version is now 3, new opcoded added for high resolution times. Redis is still able to correctly load RDB version 2. Tests passing but still a work in progress. API to specify milliseconds expires still missing, but the precision of normal expires is now already improved and working.
This commit is contained in:
@ -52,6 +52,7 @@
|
||||
#define rdbIsObjectType(t) ((t >= 0 && t <= 4) || (t >= 9 && t <= 12))
|
||||
|
||||
/* Special RDB opcodes (saved/loaded with rdbSaveType/rdbLoadType). */
|
||||
#define REDIS_RDB_OPCODE_EXPIRETIME_MS 252
|
||||
#define REDIS_RDB_OPCODE_EXPIRETIME 253
|
||||
#define REDIS_RDB_OPCODE_SELECTDB 254
|
||||
#define REDIS_RDB_OPCODE_EOF 255
|
||||
@ -76,7 +77,7 @@ off_t rdbSavedObjectLen(robj *o);
|
||||
off_t rdbSavedObjectPages(robj *o);
|
||||
robj *rdbLoadObject(int type, rio *rdb);
|
||||
void backgroundSaveDoneHandler(int exitcode, int bysignal);
|
||||
int rdbSaveKeyValuePair(rio *rdb, robj *key, robj *val, time_t expireitme, time_t now);
|
||||
int rdbSaveKeyValuePair(rio *rdb, robj *key, robj *val, long long expireitme, long long now);
|
||||
robj *rdbLoadStringObject(rio *rdb);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user