沙洲会议如何进行?
我应该为 Clojure Web 应用程序使用 sandbar 。我想知道沙洲如何在服务器端维护会话?它是否使用 jsessionid
cookie 来识别用户请求?或者sandbar只是将会话对象发送回客户端,从请求中重新读取它,操作会话并将其重新发送回?
I'm supposed to use sandbar for a Clojure web application. I am wondering how sandbar maintains sessions on the server side? Does it us jsessionid
cookies to identify user request? Or is sandbar just sending the session object back to the client, re-reading it from the request, manipulating the session and re-sending it back?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
沙洲会话使用与环会话相同的存储后端,并且
wrap-stateful-session
支持环的wrap-session
使用的相同选项。因此,您可以使用您喜欢的任何会话密钥(默认情况下不是jsessionid
)和您喜欢的商店。默认是内存存储。sandbar sessions use the same storage backends that ring sessions use, and
wrap-stateful-session
supports the same options that ring'swrap-session
uses. So you can use any session key you like (it's notjsessionid
by default) and your preferred store. The default is an in-memory store.每个用户都会获得一个唯一的会话 ID,这就是在 cookie 中发送给用户的全部内容。服务器端有一个可变对象,将会话 ID 映射到对象 - 沙洲更新并根据当前会话 ID 从中读取。
Each user gets a unique session ID, and that's all that's sent to the user in a cookie. Server-side, there's a mutable object mapping session IDs to objects - sandbar updates and reads from this based on the current session ID.