jrschumacher / symfony-redis-session-handler
Redis Session Handler Symfony HttpFoundation Component
Installs: 57 021
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 2
Forks: 8
Open Issues: 1
Requires
- ext-redis: *
- symfony/http-foundation: >=1.0
This package is not auto-updated.
Last update: 2024-10-26 16:17:59 UTC
README
This is a fork of Baachi's work
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
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:*
.
<? // Initalization above $options = array( 'key_prefix' => 'php:ses:' ); new RedisSessionHandler($redisclient, $sessionTimeout, $options);