echosong/redis-session

An simple Redis session handler

Maintainers

Package info

github.com/Echosong/redis-session-handler

pkg:composer/echosong/redis-session

Statistics

Installs: 311

Dependents: 0

Suggesters: 0

Stars: 8

Open Issues: 1

1.0 2017-08-17 09:22 UTC

This package is not auto-updated.

Last update: 2026-03-15 10:53:22 UTC


README

Download and install

install php extension for redis http://pecl.php.net/package/redis

Composer package

composer require echosong/redis-session

Basic Usage

```php

$config =[
       'host'=>'127.0.0.1',
       'port'=> 6379,
       'timeout'=>2,
      'auth'=>'****',
      'database'=>2,
      'prefix' => 'redis_session:'
  ]
session_set_save_handler(new \Echosong\RedisSession\RedisSessionHandler($config), true);
session_start();
$_SESSION['user']= "admin";

```