|
|
@ -105,24 +105,28 @@ module.exports = function(redisClient, module) {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
module.expire = function(key, seconds, callback) {
|
|
|
|
module.expire = function(key, seconds, callback) {
|
|
|
|
|
|
|
|
callback = callback || function() {};
|
|
|
|
redisClient.expire(key, seconds, function(err) {
|
|
|
|
redisClient.expire(key, seconds, function(err) {
|
|
|
|
callback(err);
|
|
|
|
callback(err);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
module.expireAt = function(key, timestamp, callback) {
|
|
|
|
module.expireAt = function(key, timestamp, callback) {
|
|
|
|
|
|
|
|
callback = callback || function() {};
|
|
|
|
redisClient.expireat(key, timestamp, function(err) {
|
|
|
|
redisClient.expireat(key, timestamp, function(err) {
|
|
|
|
callback(err);
|
|
|
|
callback(err);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
module.pexpire = function(key, ms, callback) {
|
|
|
|
module.pexpire = function(key, ms, callback) {
|
|
|
|
|
|
|
|
callback = callback || function() {};
|
|
|
|
redisClient.pexpire(key, ms, function(err) {
|
|
|
|
redisClient.pexpire(key, ms, function(err) {
|
|
|
|
callback(err);
|
|
|
|
callback(err);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
module.pexpireAt = function(key, timestamp, callback) {
|
|
|
|
module.pexpireAt = function(key, timestamp, callback) {
|
|
|
|
|
|
|
|
callback = callback || function() {};
|
|
|
|
redisClient.pexpireat(key, timestamp, function(err) {
|
|
|
|
redisClient.pexpireat(key, timestamp, function(err) {
|
|
|
|
callback(err);
|
|
|
|
callback(err);
|
|
|
|
});
|
|
|
|
});
|
|
|
|