diff --git a/README.md b/README.md index 26e6eb8..c28d1bd 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ This is read-only demo with guest account enabled. ## Features & Goals - Multiple storage adapters (Local, FTP, Amazon S3, Dropbox, DO Spaces, Azure Blob and many others via [Flysystem](https://github.com/thephpleague/flysystem)) - Multiple auth adapters with roles and permissions (Store users in json file or database) -- Multiple session adapters (Native File, Pdo, MongoDB, Memcached and others via [Symfony](https://github.com/symfony/symfony/tree/master/src/Symfony/Component/HttpFoundation/Session/Storage/Handler)) +- Multiple session adapters (Native File, Pdo, Redis, MongoDB, Memcached and others via [Symfony](https://github.com/symfony/symfony/tree/master/src/Symfony/Component/HttpFoundation/Session/Storage/Handler)) - Single page front-end (built with [Vuejs](https://github.com/vuejs/vue), [Bulma](https://github.com/jgthms/bulma) and [Buefy](https://github.com/buefy/buefy)) - Chunked uploads (built with [Resumable.js](https://github.com/23/resumable.js)) - Zip and bulk download support diff --git a/docs/configuration/session.md b/docs/configuration/session.md index 4788432..1a36f4a 100644 --- a/docs/configuration/session.md +++ b/docs/configuration/session.md @@ -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 diff --git a/docs/index.md b/docs/index.md index 853e70b..7711ead 100644 --- a/docs/index.md +++ b/docs/index.md @@ -22,7 +22,7 @@ File upload supports drag&drop, progress bar, pause and resume. Upload is chunke ## Features & Goals - Multiple storage adapters (Local, FTP, Amazon S3, Dropbox, DO Spaces, Azure Blob and many others via [Flysystem](https://github.com/thephpleague/flysystem)) - Multiple auth adapters with roles and permissions (Store users in json file or database) -- Multiple session adapters (Native File, Pdo, MongoDB, Memcached and others via [Symfony](https://github.com/symfony/symfony/tree/master/src/Symfony/Component/HttpFoundation/Session/Storage/Handler)) +- Multiple session adapters (Native File, Pdo, Redis, MongoDB, Memcached and others via [Symfony](https://github.com/symfony/symfony/tree/master/src/Symfony/Component/HttpFoundation/Session/Storage/Handler)) - Single page front-end (built with [Vuejs](https://github.com/vuejs/vue), [Bulma](https://github.com/jgthms/bulma) and [Buefy](https://github.com/buefy/buefy)) - Chunked uploads (built with [Resumable.js](https://github.com/23/resumable.js)) - Zip and bulk download support