visionmedia/connect-redis — Issue #40: atomic session update
Author: furtivefelon
Created: 2012-02-26 22:47:18+00:00
State: open

Hey guys,

I am trying to manage uploads through sessions, so for every uploaded file, a new entry will be made in the req.session object. Since i support concurrent uploads, if i just do req.session.photos[photo.id] = photo; req.session.save(); There could possibly be race conditions since the updates are not atomic (where a later save would just override the earlier req.session.photos object)

can someone enlighten me whether it is possible to get atomic updates (since redis does support atomic update)?

Thanks a lot :)

Jason