Python:Redis 作为 Beaker 的会话后端
有人成功使用 Redis 作为 Beaker 后端吗?你能告诉我链接或库如何做到这一点吗?我正在寻找任何可以执行此操作但无法从谷歌搜索中获取任何内容的库。
Anyone had success with using Redis as Beaker backend? Can you tell me link or library how to do it? I am looking for any library which does this but could not get anything out of google search.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已发布到 pylons 用户组,此信息解决了我的问题。
http:// groups.google.com/group/pylons-discuss/msg/a1144aa1ca8e0417
以下是对我有用的步骤:
<前><代码>[应用程序:主]
全栈=真
静态文件 = true
cache_dir = %(此处)s/数据
烧杯.session.type = redis
烧杯.session.url:127.0.0.1:6379
beaker.session.key = 应用程序名称
(可选)
编辑此文件并将序列化方法更改为 JSON。甚至
虽然 JSON 的字节对字节效率不高,但我喜欢它的简单性
在我所使用的技术中可读且得到相对良好的支持
选择:
https://github.com/bbangert/beaker_extensions/blob/master /beaker_extensions/redis_.py
由 Jeff Tchang 发布
I have posted to pylons user group and this information resolve my question..
http://groups.google.com/group/pylons-discuss/msg/a1144aa1ca8e0417
Here are the steps that worked for me:
Edit Pylons' development.ini
(Optional)
Edit this file and change the serialization method to JSON. Even
though JSON is not as efficient byte for byte I like how it is easily
readable and relatively well supported across the technologies I've
chosen:
https://github.com/bbangert/beaker_extensions/blob/master/beaker_extensions/redis_.py
Posted by Jeff Tchang