PHPackages                             switon/redis - 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. switon/redis

ActiveLibrary[Caching](/categories/caching)

switon/redis
============

Redis client services with pooling support for Switon Framework

v1.0.0(1mo ago)03310MITPHPPHP &gt;=8.3CI passing

Since May 9Pushed 1mo agoCompare

[ Source](https://github.com/switon-php/redis)[ Packagist](https://packagist.org/packages/switon/redis)[ Docs](https://github.com/switon-php/redis)[ RSS](/packages/switon-redis/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (6)Versions (2)Used By (10)

Switon Redis Package
====================

[](#switon-redis-package)

Redis client services and pooling for Switon Framework.

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

[](#installation)

```
composer require switon/redis
```

**Requirements:** PHP 8.3+, `ext-redis`

Quick Start
-----------

[](#quick-start)

```
use Switon\Core\Attribute\Autowired;
use Switon\Redis\ClientInterface;

class UserService
{
    #[Autowired] protected ClientInterface $redis;

    public function cacheUser(int $userId, array $data): void
    {
        $this->redis->set("user:{$userId}", json_encode($data), 3600);
    }

    public function getUser(int $userId): ?array
    {
        $raw = $this->redis->get("user:{$userId}");
        return $raw === false ? null : json_decode($raw, true);
    }
}
```

Docs:

License
-------

[](#license)

MIT.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance94

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity48

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

31d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc0f20ad15b0ae9fbf9c6e2cd3008692b0c88a877ec8d3e0119211314bf86fc8?d=identicon)[switon](/maintainers/switon)

---

Top Contributors

[![switon-php](https://avatars.githubusercontent.com/u/247358032?v=4)](https://github.com/switon-php "switon-php (6 commits)")

---

Tags

cachepoolingredisswitonrediscachepoolingswiton

### Embed Badge

![Health badge](/badges/switon-redis/health.svg)

```
[![Health](https://phpackages.com/badges/switon-redis/health.svg)](https://phpackages.com/packages/switon-redis)
```

###  Alternatives

[tedivm/stash

The place to keep your cache.

9614.9M126](/packages/tedivm-stash)[awssat/laravel-visits

Laravel Redis visits counter for Eloquent models

975169.8k2](/packages/awssat-laravel-visits)[cache/redis-adapter

A PSR-6 cache implementation using Redis (PhpRedis). This implementation supports tags

574.0M27](/packages/cache-redis-adapter)[tedivm/stash-bundle

Incorporates the Stash caching library into Symfony.

871.4M16](/packages/tedivm-stash-bundle)[kdyby/redis

Redis storage for Nette Framework

501.7M2](/packages/kdyby-redis)[matomo/cache

PHP caching library based on Doctrine cache

381.1M18](/packages/matomo-cache)

PHPackages © 2026

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