Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 23 days 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 (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-08-20T11:44:24.000Z (about 8 years ago)
- Last Synced: 2024-10-04T16:14:34.707Z (about 1 month ago)
- Language: PHP
- Size: 199 KB
- Stars: 12
- Watchers: 2
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Symfony2 Redis Session Handler
[![Build Status](https://travis-ci.org/jrschumacher/symfony-redis-session-handler.png)](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);
```