that.krypto.hashUser(user, function(err, userKey) { if (err) { return callback(err); } redisClient.exists(userKey.toString('utf8'), function(error, exists) { if (err) { return callback(err); } if (parseInt(exists.toString('utf-8')) === 1 ) { return callback(null, true); } else { return callback(null, false); } }); });
//checking the existence of keys client.exists('tags', function(err, reply) { if (reply === 1) { console.log('exists'); } else { console.log('doesn\'t exist'); } });
userObject.password = passwordValue; redisClient.exists(userKey.toString('utf8'), function(error, exists) {
redisClient.exists(userKey.toString('utf8'), function(error, exists) {
redisClient.exists(userKey.toString('utf8'), function(error, exists) {
//setting expiration time for particular key //client.set('key1', 'val1'); //client.expire('key1', 30); //checking existence after expiration client.exists('key1', function(err, reply) { if (reply === 1) { console.log('exists'); } else { console.log('doesn\'t exist'); } });
//checking existence after deletion client.exists('frameworks_arr', function(err, reply) { if (reply === 1) { console.log('exists'); } else { console.log('doesn\'t exist'); } });