开发者

What is the simplest, currently functional way to save sessions in Connect?

开发者 https://www.devze.com 2023-02-27 11:30 出处:网络
I cannot find a list of session store implementations that work with Connect in node.js. Connect-Redis works great, but requires Redis and I\'d 开发者_运维百科rather avoid that dependency. Sesame/nSto

I cannot find a list of session store implementations that work with Connect in node.js. Connect-Redis works great, but requires Redis and I'd 开发者_运维百科rather avoid that dependency. Sesame/nStore would be ideal but no longer appears to work at all. Sesame/supermarket requires fiddling with node-waf in order to work, and I'd like to avoid that as well.


For a quick and dirty currently functional way to save sessions I'd recommend using dirty.

It's just a key value store, but it doesn't take much to hook up to connect sessions.


Connect comes with a default in-memory session store. Dirty lets you to implement a in-memory session store backed up to disk. It won't allow you to save memory space, it merely adds persistence to your store, and I doubt a persistent session store has much use.

Why do you need a persistent session store? What requirements to a session store are not implemented by the default session store provided by connect? Is it only persistence, or you have something else in mind?

0

精彩评论

暂无评论...
验证码 换一张
取 消