简体   繁体   English

在redis中存储Symfony2会话

[英]Store Symfony2 session in redis

I want to store the user sessions in Redis to make them usable for Symfony2 and node.js. 我想将用户会话存储在Redis中,以使它们可用于Symfony2和node.js.

Symfony2 supports MySQL and PostgreSQL as session storage but I would like to use Redis. Symfony2支持MySQL和PostgreSQL作为会话存储,但我想使用Redis。

I found this new pull request which implements already a RedisSessionHandler : https://github.com/Baachi/symfony/blob/redis-session-storage/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php 我发现这个新的pull请求已经实现了RedisSessionHandlerhttps//github.com/Baachi/symfony/blob/redis-session-storage/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php

I just didn't found anything about if it is safe to use. 我只是没有发现任何关于它是否安全使用的信息。 Has somebody some infos or is there already some other fix (maybe a bundle) available? 有人有一些信息或是否已经有一些其他修复(可能是捆绑)?

or is there already some other fix (maybe a bundle) available? 或者是否已经有其他一些修复(可能是捆绑)?

Linked RedisSessionHandler requires phpredis extension, that can be configured to act as session handler in php.ini (sessions will be stored with keys $key = 'PHPREDIS_SESSION:'.$hash; ) 链接的RedisSessionHandler需要phpredis扩展,可以配置为在php.ini中充当会话处理程序(会话将与key $key = 'PHPREDIS_SESSION:'.$hash;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM