https://github.com/jrschumacher/symfony-redis-session-handler
Symfony2 Redis Session Handler (fork of Baachi/symfoy)
https://github.com/jrschumacher/symfony-redis-session-handler
Last synced: 2 months ago
JSON representation
Symfony2 Redis Session Handler (fork of Baachi/symfoy)
- Host: GitHub
- URL: https://github.com/jrschumacher/symfony-redis-session-handler
- Owner: jrschumacher
- Created: 2013-08-05T19:57:39.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2016-08-20T11:44:24.000Z (almost 9 years ago)
- Last Synced: 2025-05-02T05:04:47.258Z (2 months ago)
- Language: PHP
- Size: 199 KB
- Stars: 12
- Watchers: 1
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Symfony2 Redis Session Handler
[](https://travis-ci.org/jrschumacher/symfony-redis-session-handler)This is a [fork of Baachi's work](https://github.com/Baachi/symfony/blob/redis-session-storage/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php)
## Use
```php
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:*`.
```php
// Initalization above
$options = array(
'key_prefix' => 'php:ses:'
);
new RedisSessionHandler($redisclient, $sessionTimeout, $options);
```