flipboxfactory / craft-session-redis
Craft session component
1.0.0
2018-09-20 03:39 UTC
Requires
- craftcms/cms: ^3.0.0
- yiisoft/yii2-redis: ^2.0
Requires (Dev)
- phpunit/phpunit: ^5.0
- squizlabs/php_codesniffer: ^2.0
This package is auto-updated.
Last update: 2024-10-09 14:02:52 UTC
README
We recommend using the configuration (via config/app.php
file) below rather than the contents of this package.
<?php
return [
'components' => [
'session' => [
'class' => \yii\redis\Session::class,
'as session' => [
'class' => \craft\behaviors\SessionBehavior::class,
]
]
]
];
Redis session component for Craft CMS
Installation
To install, use composer:
composer require flipboxfactory/craft-session-redis
Configure
Merge the following (or a variation of) configuration to your config/app.php
file.
<?php
return [
'components' => [
'redis' => [
'class' => yii\redis\Connection::class,
'hostname' => getenv('REDIS_HOSTNAME')
],
'session' => [
'class' => flipbox\craft\session\Redis::class,
'keyPrefix' => 'session'
]
]
];
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.