Skip to content
Snippets Groups Projects
Commit d8a743a8 authored by Matt Schwager's avatar Matt Schwager
Browse files

Added Redis session storage documentation

parent 9ffc119f
No related branches found
No related tags found
No related merge requests found
...@@ -43,6 +43,8 @@ Prerequisites ...@@ -43,6 +43,8 @@ Prerequisites
* When using databases: * When using databases:
* Always: `PDO` * Always: `PDO`
* Database driver: (`mysql`, `pgsql`, ...) * Database driver: (`mysql`, `pgsql`, ...)
* Support for the following PHP packages:
* When saving session information to a Redis server: `predis`
What actual packages are required for the various extensions varies between different platforms and distributions. What actual packages are required for the various extensions varies between different platforms and distributions.
......
...@@ -29,6 +29,7 @@ The `store.type` configuration option in `config.php` allows you to select which ...@@ -29,6 +29,7 @@ The `store.type` configuration option in `config.php` allows you to select which
* `phpsession` uses the built in session management in PHP. This is the default, and is simplest to use. It will not work in a load-balanced environment in most configurations. * `phpsession` uses the built in session management in PHP. This is the default, and is simplest to use. It will not work in a load-balanced environment in most configurations.
* `memcache` uses the memcache software to cache sessions in memory. Sessions can be distributed and replicated among several memcache servers, enabling both load-balancing and fail-over. * `memcache` uses the memcache software to cache sessions in memory. Sessions can be distributed and replicated among several memcache servers, enabling both load-balancing and fail-over.
* `sql` stores the session in an SQL database. * `sql` stores the session in an SQL database.
* `redis` stores the session in Redis.
'store.type' => 'phpsession', 'store.type' => 'phpsession',
...@@ -156,6 +157,12 @@ Username and password for accessing the database can be configured in the `store ...@@ -156,6 +157,12 @@ Username and password for accessing the database can be configured in the `store
The required tables are created automatically. If you are storing data from multiple separate SimpleSAMLphp installations in the same database, you can use the `store.sql.prefix` option to prevent conflicts. The required tables are created automatically. If you are storing data from multiple separate SimpleSAMLphp installations in the same database, you can use the `store.sql.prefix` option to prevent conflicts.
### Configuring Redis storage
To store sessions in Redis, set the `store.type` option to `redis`.
By default SimpleSAMLphp will attempt to connect to Redis on the `localhost` at port `6379`. These can be configured via the `store.redis.host` and `store.redis.port` options, respectively. You may also set a key prefix with the `store.redis.prefix` option.
## Metadata storage ## Metadata storage
Several metadata storage backends are available by default, including `flatfile`, `serialize`, `mdq` and Several metadata storage backends are available by default, including `flatfile`, `serialize`, `mdq` and
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment