faeldt / redis-mock

Node.js redis client mock
112 stars 156 forks source link

Full support for TTL #61

Open jamesstonehill opened 5 years ago

jamesstonehill commented 5 years ago

Not sure how easy this would be but it would be awesome to have full support for ttl

const mock = require("redis-mock");
const client = mock.createClient();

client.setex("someKey", 300, "someValue");

client.ttl("someKey", (err, reply) => {
  console.log(reply);
});

At the moment reply is always -1.