I'm using redisStore in express.
User session data is available at something like sess:eI6Jnj0gzMkdEvszUciqbcJ9
, if i do:-
redisClient.set('sess:eI6Jnj0gzMkdEvszUciqbcJ9', 'something', function(err){
console.log(err || ' session changed');
});
'session changed' actually prints on console. but sess:eI6Jnj0gzMkdEvszUciqbcJ9
is not updated in database. I'm presuming, express does not permit redisClient.set
to change the session data. How may i achieve it?
PS. The change works on my localhost but does not work, once i use redistogo on heroku.
Edit:-
I check the key not updating, by runnign get 'sess:eI6Jnj0gzMkdEvszUciqbcJ9' command on the console. i am using redis.createClient
var redisClient = require('redis').createClient( 3374, 'birdeye.redistogo.com', {detect_buffers: true});
redisClient.auth('052cb8c4142g202f7878588dd5fb129', function() {
console.log('Redis client connected');
});
I am only guessing that express.js may be 'updating its session automatically Probably, it simply overwrites all your changes with req.session.'