PHPackages                             waljqiang/cache - 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. waljqiang/cache

ActiveLibrary[Caching](/categories/caching)

waljqiang/cache
===============

The driver for cache

1.1.2(7y ago)04MITPHPPHP &gt;=5.5

Since Apr 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/waljqiang/cache)[ Packagist](https://packagist.org/packages/waljqiang/cache)[ RSS](/packages/waljqiang-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

Nova\\Cache
===========

[](#novacache)

Features
--------

[](#features)

- 支持常用缓存。
- 目前仅提供redis缓存方式，redis缓存使用predis/predis，

[github地址](https://github.com/nrk/predis):.

[packagelist地址](https://packagist.org/packages/predis/predis):.

- 可自行扩展使用自己的缓存类
- 支持缓存开关

使用
--

[](#使用)

- redis作为缓存使用

    1.引入自动加载。

```
    require_once __DIR__ . '/../autoload.php';
    require_once __DIR__ . '/../vendor/autoload.php';

```

```
 2.缓存配置type配置成redis

```

```
$config = [
    'type' => 'redis',
    'parameters' => [
        'scheme' => 'tcp',
        'host' => '127.0.0.1',
        'port' => 6379,
        'database' => 1,
        'password' => '1f494c4e0df9b837dbcc82eebed35ca3f2ed3fc5f6428d75bb542583fda2170f'
    ],
    'options' => [
        'profile' => '2.8',
        'prefix' => 'yuncore:'
    ]
];

```

```
3.获取缓存实例

```

```
    $cache = Nova\Cache\Cache::getInstance($config['type'],$config['parameters'],$config['options'],true);

```

```
4.按照predis/predis文档调用相关方法即可

```

```
    $cache->set('aa',100);
    $cache->get('aa');
    $cache->set('dd',200);
    $cache->getMultiple(['aa','dd','cc'],'adf');
    $cache->setMultiple(['ff' => 300,'ee' => 400]);
    $cache->deleteMultiple(['ff','ee','mm']);
    $cachea->has('aa');
    $cache->lpush('aaa',500);
    $cache->rpop('aaa');
    $cache->clear();

```

- 扩展自己缓存类

    1.必须继承Nova\\Cache\\Cache类。

    2.必须实现Nova\\Cache\\Driver\\CacheInterface接口。

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Every ~2 days

Total

4

Last Release

2582d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10058619?v=4)[nova](/maintainers/waljqiang)[@waljqiang](https://github.com/waljqiang)

### Embed Badge

![Health badge](/badges/waljqiang-cache/health.svg)

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

###  Alternatives

[rhubarbgroup/redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.

51795.3k1](/packages/rhubarbgroup-redis-cache)[monospice/laravel-redis-sentinel-drivers

Redis Sentinel integration for Laravel and Lumen.

103830.5k](/packages/monospice-laravel-redis-sentinel-drivers)[jamescauwelier/psredis

Sentinel client for the popular php redis client

77392.9k5](/packages/jamescauwelier-psredis)[cache/predis-adapter

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

272.6M13](/packages/cache-predis-adapter)[symfony-bundles/redis-bundle

Symfony Redis Bundle

271.1M5](/packages/symfony-bundles-redis-bundle)[pdffiller/qless-php

PHP Bindings for qless

29113.2k1](/packages/pdffiller-qless-php)

PHPackages © 2026

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