-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add strlen,setex,psetex and setnx cmds #39
Conversation
src/cmd_kv.cc
Outdated
PSTORE.SetValue(client->argv_[1], PObject::CreateString(client->argv_[3])); | ||
int64_t sec = 0; | ||
pstd::String2int(client->argv_[2], &sec); | ||
PSTORE.SetExpire(client->argv_[1], ::Now() + sec * 1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pstd下现在有获取时间戳的函数了, 可以用pstd里的函数获取
src/cmd_kv.cc
Outdated
PSTORE.SetValue(client->argv_[1], PObject::CreateString(client->argv_[3])); | ||
int64_t msec = 0; | ||
pstd::String2int(client->argv_[2], &msec); | ||
PSTORE.SetExpire(client->argv_[1], ::Now() + msec); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同样, 时间戳获取改一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已替换
No description provided.