在 Connect 中保存会话的最简单、当前有效的方法是什么?
我找不到与 Node.js 中的 Connect 配合使用的会话存储实现列表。 Connect-Redis 效果很好,但需要 Redis,我宁愿避免这种依赖。 Sesame/nStore 是理想的选择,但似乎根本不再起作用。芝麻/超市需要摆弄node-waf才能工作,我也想避免这种情况。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于保存会话的快速而肮脏的当前功能方式,我建议使用 dirty。
它只是一个键值存储,但不需要太多的时间就可以连接会话。
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 附带默认的内存会话存储。 Dirty 允许您实现备份到磁盘的内存中会话存储。它不会让您节省内存空间,它只会增加存储的持久性,我怀疑持久会话存储有多大用处。
为什么需要持久会话存储? connect 提供的默认会话存储未实现对会话存储的哪些要求?只是坚持,还是另有目的?
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?