Skip to content

Allow 64bit ints for TTL in client. #13

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

Merged
merged 1 commit into from
Mar 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions includes/cpp_redis/core/client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1151,9 +1151,9 @@ namespace cpp_redis {
std::future<reply> ping(const std::string &message);

client &
psetex(const std::string &key, int ms, const std::string &val, const reply_callback_t &reply_callback);
psetex(const std::string &key, int64_t ms, const std::string &val, const reply_callback_t &reply_callback);

std::future<reply> psetex(const std::string &key, int ms, const std::string &val);
std::future<reply> psetex(const std::string &key, int64_t ms, const std::string &val);

client &publish(const std::string &channel, const std::string &message, const reply_callback_t &reply_callback);

Expand Down Expand Up @@ -1307,9 +1307,9 @@ namespace cpp_redis {
std::future<reply> setbit_(const std::string &key, int offset, const std::string &value);

client &
setex(const std::string &key, int seconds, const std::string &value, const reply_callback_t &reply_callback);
setex(const std::string &key, int64_t seconds, const std::string &value, const reply_callback_t &reply_callback);

std::future<reply> setex(const std::string &key, int seconds, const std::string &value);
std::future<reply> setex(const std::string &key, int64_t seconds, const std::string &value);

client &setnx(const std::string &key, const std::string &value, const reply_callback_t &reply_callback);

Expand Down
8 changes: 4 additions & 4 deletions sources/core/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,7 @@ namespace cpp_redis {
}

client &
client::psetex(const std::string &key, int ms, const std::string &val,
client::psetex(const std::string &key, int64_t ms, const std::string &val,
const reply_callback_t &reply_callback) {
send({"PSETEX", key, std::to_string(ms), val}, reply_callback);
return *this;
Expand Down Expand Up @@ -1967,7 +1967,7 @@ namespace cpp_redis {
}

client &
client::setex(const std::string &key, int seconds, const std::string &value, const reply_callback_t &reply_callback) {
client::setex(const std::string &key, int64_t seconds, const std::string &value, const reply_callback_t &reply_callback) {
send({"SETEX", key, std::to_string(seconds), value}, reply_callback);
return *this;
}
Expand Down Expand Up @@ -4020,7 +4020,7 @@ namespace cpp_redis {
}

std::future<reply>
client::psetex(const std::string &key, int ms, const std::string &val) {
client::psetex(const std::string &key, int64_t ms, const std::string &val) {
return exec_cmd([=](const reply_callback_t &cb) -> client & { return psetex(key, ms, val, cb); });
}

Expand Down Expand Up @@ -4199,7 +4199,7 @@ namespace cpp_redis {
}

std::future<reply>
client::setex(const std::string &key, int seconds, const std::string &value) {
client::setex(const std::string &key, int64_t seconds, const std::string &value) {
return exec_cmd([=](const reply_callback_t &cb) -> client & { return setex(key, seconds, value, cb); });
}

Expand Down