mirror of
https://github.com/filegator/filegator.git
synced 2025-08-15 05:34:32 +02:00
Website generation with Couscous
This commit is contained in:
@@ -168,6 +168,19 @@
|
||||
],
|
||||
</code></pre>
|
||||
<p>Don't forget to enter correct database details.</p>
|
||||
<h2 id="configuring-session-service-to-use-redis">Configuring Session service to use Redis</h2>
|
||||
<p>You must require additional library <code>composer require predis/predis</code></p>
|
||||
<pre><code> '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);
|
||||
},
|
||||
],
|
||||
],</code></pre>
|
||||
<h2 id="tweaking-session-options">Tweaking session options</h2>
|
||||
<p>The underying <a href="https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php">session component</a> accepts array of options.
|
||||
For example you can pass <code>cookie_lifetime</code> parameter to extend default session lifetime:</p>
|
||||
|
Reference in New Issue
Block a user