mirror of
https://github.com/filegator/filegator.git
synced 2025-07-31 22:00:13 +02:00
Redis session docs
This commit is contained in:
@@ -54,6 +54,23 @@ Then, open `configuration.php` and update Session handler to:
|
||||
```
|
||||
Don't forget to enter correct database details.
|
||||
|
||||
## Configuring Session service to use Redis
|
||||
|
||||
You must require additional library `composer require predis/predis`
|
||||
|
||||
```
|
||||
'Filegator\Services\Session\SessionStorageInterface' => [
|
||||
'handler' => '\Filegator\Services\Session\Adapters\SessionStorage',
|
||||
'config' => [
|
||||
'handler' => function () {
|
||||
$predis = new \Predis\Client();
|
||||
$handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler($predis);
|
||||
|
||||
return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([], $handler);
|
||||
},
|
||||
],
|
||||
],
|
||||
```
|
||||
|
||||
## Tweaking session options
|
||||
|
||||
|
Reference in New Issue
Block a user