flipboxfactory/craft-session-redis

1.0.0 2018-09-20 03:39 UTC

This package is auto-updated.

Last update: 2024-12-09 14:16:38 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

Latest Version Software License Quality Score Total Downloads

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.