milqmedia / mq-redis-session
Zend Framework 2 redis session storage
Installs: 25 558
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 7
Forks: 6
Open Issues: 1
Requires
- php: >=5.3.3
- zendframework/zendframework: >2.0
This package is not auto-updated.
Last update: 2023-02-06 21:37:57 UTC
README
Zend Framework Module for storing sessions in Redis.
Features
- Redis SessionSaveHandler support
- Uses Zend\Cache\StorageFactory
- Easy session configuration
Setup
- Run
php composer.phar require milqmedia/mq-redis-session:dev-master
- Add
MQRedisSessionStorage
to the enabled modules list - Copy
vendor/milqmedia/mq-redis-session/config/redissession.global.php.dist
toconfig/autoload/redissession.global.php
- Configure the session options in
config/autoload/redissession.global.php
- Session storage will be set by default. For more control set "set_storage_on_boot" to false in your config file and add the lines below in your project's main module or elsewhere:
```php
$redisStorage = $sm->get('MQRedisSessionStorage\Storage\RedisStorage');
$redisStorage->setSessionStorage();
```