选择充足的Rails会话存储 [英] Choosing adequate Rails session store

查看:98
本文介绍了选择充足的Rails会话存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用基于memcached的会话存储( https://github.com/mperham/dalli)。有时memcached服务器不可用(没有可用的服务器),然后我的用户不再能够使用该应用程序。目前我有疑问,如果一个基于memcached的会话是正确的决定。

I am currently using a memcached-based session store ( https://github.com/mperham/dalli ). From time to time the memcached server is unavailable ("No server available"), and then my users aren't able anymore to use the application. Currently I have doubts if a memcached-based session is the right decision.

由于我只存储很少的键在会话中我正在考虑切换回一个cookie存储。还是应该考虑使用ActiveRecord存储?任何建议?

Since I only store very few keys in a session I am thinking about switching back to a cookie store. Or should I consider using an ActiveRecord store? Any advice?

谢谢!

推荐答案

对于基本需求,它更容易维护。

For that basic need it's easier to maintain.

指南中有一些建议: http://guides.rubyonrails.org/action_controller_overview.html#会话

这篇关于选择充足的Rails会话存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆