topic description
nodejs redis gets the data and Synchronize returns
sources of topics and their own ideas
Synchronize returns the data saved by redis
related codes
//
/**
* string
* @param key
* @param callBack(err,result)
*/
db.get = function(key, callback){
client.get(key, function(err,result){
if (err) {
console.log(err);
callback(err,null)
return;
}
callback(null,result);
});
}
//
Redis.set("GetColumnList","",3600,redis.print);
//
var data= Redis.get("GetColumnList",redis.print);
if (data!=null && data!=undefined && data!="") {
console.log(data);
res.send(data);
}else {
console.log(data);
res.send("");
}
what result do you expect? What is the error message actually seen?
Synchronize returns data