Add session specific redis cache

This commit is contained in:
Dane Everitt 2018-03-06 22:58:38 -06:00
parent 4964d294f6
commit 4952a27903
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 16 additions and 1 deletions

View file

@ -10,6 +10,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
### Changed ### Changed
* Panel now throws proper 504: Gateway Timeout errors on server listing when daemon is offline. * Panel now throws proper 504: Gateway Timeout errors on server listing when daemon is offline.
* Sessions handled through redis now use a seperate database (default `1`) to store session database to avoid logging users out when flushing the cache.
## v0.7.5 (Derelict Dermodactylus) ## v0.7.5 (Derelict Dermodactylus)
### Fixed ### Fixed

View file

@ -70,6 +70,12 @@ return [
'driver' => 'redis', 'driver' => 'redis',
'connection' => 'default', 'connection' => 'default',
], ],
'sessions' => [
'driver' => env('SESSION_DRIVER', 'database'),
'table' => 'sessions',
'connection' => env('SESSION_DRIVER') === 'redis' ? 'sessions' : null,
],
], ],
/* /*

View file

@ -71,11 +71,19 @@ return [
'redis' => [ 'redis' => [
'client' => 'predis', 'client' => 'predis',
'default' => [ 'default' => [
'host' => env('REDIS_HOST', 'localhost'), 'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DATBASE', 0), 'database' => env('REDIS_DATBASE', 0),
], ],
'sessions' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DATBASE_SESSIONS', 1),
],
], ],
]; ];

View file

@ -69,7 +69,7 @@ return [
| |
*/ */
'connection' => null, 'connection' => env('SESSION_DRIVER') === 'redis' ? 'sessions' : null,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------