diff --git a/configuration/session.html b/configuration/session.html index ca7cb0f..225b18b 100644 --- a/configuration/session.html +++ b/configuration/session.html @@ -168,6 +168,19 @@ ],

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

The underying session component accepts array of options. For example you can pass cookie_lifetime parameter to extend default session lifetime:

diff --git a/index.html b/index.html index 38fdb35..65b946c 100644 --- a/index.html +++ b/index.html @@ -144,7 +144,7 @@