library symfony-redis-session-handler
Redis Session Handler Symfony HttpFoundation Component
jrschumacher/symfony-redis-session-handler
Redis Session Handler Symfony HttpFoundation Component
- Monday, February 24, 2014
- by jrschumacher
- Repository
- 2 Watchers
- 13 Stars
- 30,889 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 6 Forks
- 1 Open issues
- 3 Versions
- 5 % Grown
Symfony2 Redis Session Handler
, (*1)
This is a fork of Baachi's work, (*2)
Use
<?
use Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler;
$sessionTimeout = 60 * 60 * 24 * 7; // 1 week
$redisClient = new \Redis('localhost');
new RedisSessionHandler($redisClient, $sessionTimeout);
Options
This handler supports these options, (*3)
-
key_prefix - set a key prefix
Set a key prefix
This will allow you to manage your PHP session keys by running key key:prefix:*., (*4)
<?
// Initalization above
$options = array(
'key_prefix' => 'php:ses:'
);
new RedisSessionHandler($redisclient, $sessionTimeout, $options);
dev-master
9999999-dev
http://symfony.com
Redis Session Handler Symfony HttpFoundation Component
Sources
Download
MIT
The Requires
by
Ryan Schumacher
redis
symfony
session