PHPackages                             klsoft/yii3-cache-session-handler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. klsoft/yii3-cache-session-handler

ActiveLibrary[Caching](/categories/caching)

klsoft/yii3-cache-session-handler
=================================

The package implements the SessionHandlerInterface using the PSR-16 cache for storage

1.0.0(3mo ago)00MITPHPPHP &gt;=8.1

Since Feb 16Pushed 3mo agoCompare

[ Source](https://github.com/klsoft-web/yii3-cache-session-handler)[ Packagist](https://packagist.org/packages/klsoft/yii3-cache-session-handler)[ Docs](https://github.com/klsoft-web/yii3-cache-session-handler)[ RSS](/packages/klsoft-yii3-cache-session-handler/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

YII3-CACHE-SESSION-HANDLER
==========================

[](#yii3-cache-session-handler)

The package implements the SessionHandlerInterface using the PSR-16 cache for storage.

See also:

- [YII3-CACHE-REDIS](https://github.com/klsoft-web/yii3-cache-redis) - The package provides the [PSR-16](https://www.php-fig.org/psr/psr-16/) cache using the [Redis](https://github.com/phpredis/phpredis) PHP extension

Requirement
-----------

[](#requirement)

- PHP 8.1 or higher.

Installation
------------

[](#installation)

```
composer require klsoft/yii3-cache-session-handler
```

How to use
----------

[](#how-to-use)

### Configure the SessionInterface.

[](#configure-the-sessioninterface)

Example:

```
use Yiisoft\Session\SessionInterface;
use Yiisoft\Session\Session;
use Klsoft\Yii3CacheSessionHandler\SessionHandler;
use Yiisoft\Cache\CacheInterface;
use Yiisoft\Cache\Cache;
use Klsoft\Yii3CacheRedis\RedisCache;

return [
    // ...
    SessionInterface::class => [
        'class' => Session::class,
        '__construct()' => [
            'options' => $params['session']['options'] ?? [],
            'handler' => new SessionHandler(
                new RedisCache(
                    new Redis([
                        'host' => $params['redisHost'],
                        'port' => $params['redisPort'],
                        'database' => $params['redisDatabaseSession']
                    ])
                )
            )
        ]
    ],
    CacheInterface::class => [
        'class' => Cache::class,
        '__construct()' => [
            'handler' => new RedisCache(
                new Redis([
                    'host' => $params['redisHost'],
                    'port' => $params['redisPort'],
                    'database' => $params['redisDatabaseCache']
                ])
            )
        ]
    ],
];
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance82

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

91d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f4e8ac50e4ad22be84b07f4c06d28cf280d22f689c460cd385c556727e638827?d=identicon)[klsoft-web](/maintainers/klsoft-web)

---

Top Contributors

[![klsoft-web](https://avatars.githubusercontent.com/u/7967163?v=4)](https://github.com/klsoft-web "klsoft-web (1 commits)")

---

Tags

cachesessionyii3

### Embed Badge

![Health badge](/badges/klsoft-yii3-cache-session-handler/health.svg)

```
[![Health](https://phpackages.com/badges/klsoft-yii3-cache-session-handler/health.svg)](https://phpackages.com/packages/klsoft-yii3-cache-session-handler)
```

###  Alternatives

[laminas/laminas-cache

Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output

1076.9M130](/packages/laminas-laminas-cache)[graham-campbell/bounded-cache

A Bounded TTL PSR-16 Cache Implementation

101.9M6](/packages/graham-campbell-bounded-cache)[duncan3dc/helpers

A collection of useful helper classes

13188.0k](/packages/duncan3dc-helpers)[apix/simple-cache

The PSR-16 extension to Apix-Cache.

1017.4k](/packages/apix-simple-cache)[karriere/state

Laravel package for storing current application state in cache/session

1718.5k](/packages/karriere-state)[infocyph/intermix

A Collection of useful PHP class functions.

136.4k1](/packages/infocyph-intermix)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
