PHPackages                             php-sword/webman-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. php-sword/webman-cache

ActiveLibrary

php-sword/webman-cache
======================

Cache manager for webman plugin

v1.0.6(2y ago)0721Apache-2.0PHPPHP &gt;=7.4

Since Jun 9Pushed 2y agoCompare

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

READMEChangelog (7)Dependencies (5)Versions (8)Used By (1)

webman-cache
============

[](#webman-cache)

> 该插件基于`xpzhu/webman-cache`插件修改而来，感谢原作者的付出。

用于PHP缓存管理（PHP 7.4+），支持`PSR-6`及`PSR-16`缓存规范。

主要特性包括：

- 支持多缓存通道设置及切换
- 支持缓存数据递增/递减
- 支持门面调用
- 内置File/Redis/Memcache/Memcached/Wincache
- 支持缓存标签
- 支持闭包数据
- 支持`PSR-6`及`PSR-16`缓存规范

安装
--

[](#安装)

```
composer require php-sword/webman-cache

```

使用说明：
-----

[](#使用说明)

```
use sword\Cache\Facade\Cache;

// 设置缓存
Cache::set('key', 'value', 600);
// 判断缓存是否设置
Cache::has('key');
// 获取缓存
Cache::get('key');
// 删除缓存
Cache::delete('key');
// 清除缓存
Cache::clear();
// 读取并删除缓存
Cache::pull('key');
// 不存在则写入
Cache::remember('key', 10);

// 对于数值类型的缓存数据可以使用
// 缓存增+1
Cache::inc('key');
// 缓存增+5
Cache::inc('key',5);
// 缓存减1
Cache::dec('key');
// 缓存减5
Cache::dec('key',5);

// 使用缓存标签
Cache::tag('tag_name')->set('key','value',600);
// 删除某个标签下的缓存数据
Cache::tag('tag_name')->clear();
// 支持指定多个标签
Cache::tag(['tag1','tag2'])->set('key2','value',600);
// 删除多个标签下的缓存数据
Cache::tag(['tag1','tag2'])->clear();

// 使用多种缓存类型
$redis = Cache::store('redis');

$redis->set('var','value',600);
$redis->get('var');
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Every ~10 days

Recently: every ~15 days

Total

7

Last Release

1011d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c57985f59dee65fb0bd442b0eea026e3acd3339ac5fb3f9035008cdf8b36cd62?d=identicon)[kyour-cn](/maintainers/kyour-cn)

---

Top Contributors

[![kyour-cn](https://avatars.githubusercontent.com/u/38110013?v=4)](https://github.com/kyour-cn "kyour-cn (8 commits)")

### Embed Badge

![Health badge](/badges/php-sword-webman-cache/health.svg)

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[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)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)

PHPackages © 2026

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