Permalink
Browse files

fixed expiration commands (ms not s)

  • Loading branch information...
1 parent 58ad9e9 commit 4f3145635cce34e627ae5a6f6cc29d0bc2794d6f @tj committed Apr 15, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/commands/keys.js
@@ -20,7 +20,7 @@ exports.expire = function(client, key, seconds){
var obj = this.lookup(string(key));
if (obj) {
- obj.expires = Date.now() + Number(string(seconds));
+ obj.expires = Date.now() + (string(seconds) * 1000);
client.bool(true);
} else {
client.bool(false);
@@ -35,7 +35,7 @@ exports.expireat = function(client, key, seconds){
var obj = this.lookup(string(key));
if (obj) {
- obj.expires = +string(seconds);
+ obj.expires = +string(seconds) * 1000;
client.bool(true);
} else {
client.bool(false);

0 comments on commit 4f31456

Please sign in to comment.