mirror of
https://github.com/filegator/filegator.git
synced 2025-08-19 12:31:20 +02:00
Redis session docs
This commit is contained in:
@@ -56,14 +56,14 @@ Don't forget to enter correct database details.
|
|||||||
|
|
||||||
## Configuring Session service to use Redis
|
## Configuring Session service to use Redis
|
||||||
|
|
||||||
You must require additional library `composer require predis/predis`
|
You must require additional [predis](https://github.com/nrk/predis/) library `composer require predis/predis`
|
||||||
|
|
||||||
```
|
```
|
||||||
'Filegator\Services\Session\SessionStorageInterface' => [
|
'Filegator\Services\Session\SessionStorageInterface' => [
|
||||||
'handler' => '\Filegator\Services\Session\Adapters\SessionStorage',
|
'handler' => '\Filegator\Services\Session\Adapters\SessionStorage',
|
||||||
'config' => [
|
'config' => [
|
||||||
'handler' => function () {
|
'handler' => function () {
|
||||||
$predis = new \Predis\Client();
|
$predis = new \Predis\Client('tcp://127.0.0.1:6379');
|
||||||
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler($predis);
|
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler($predis);
|
||||||
|
|
||||||
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([], $handler);
|
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([], $handler);
|
||||||
|
Reference in New Issue
Block a user