redis:- session key not updating

喜欢而已 提交于 2020-01-06 15:12:57

问题


redisClient.set('sessionKey', userSession, function(err){
 console.log(err || 'sessionKey updated');
});

The above works.

But following does not update the existing session key.

redisClient.get(sessionKey, function(err, userSession){ // works fine
    userSession = // some modification;
    redisClient.set(sessionKey, userSession, function(err){
      console.log(err || 'sessionKey updated');
    });
 });

I'm using localhost with redistogo thru heroku. There is no error. Even the console.log(err || 'sessionkey update'); prints

来源:https://stackoverflow.com/questions/20331355/redis-session-key-not-updating

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!