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

ActiveLibrary[Caching](/categories/caching)

traineratwot/cache
==================

simple cache system

3.0.2(3y ago)13.3k↓41.7%12MITPHPPHP ^8.1

Since Apr 26Pushed 3y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (18)Used By (2)

Cache
=====

[](#cache)

define const `WT_CACHE_PATH` for set cache folder. without `WT_CACHE_PATH` save to vendor directory

**install**

```
composer require traineratwot/cache

```

Example:

```
$key = ['key'];
$value = ['value'];

\Traineratwot\Cache\Cache::setCache($key,$value,600,'category/subcategory')

\Traineratwot\Cache\Cache::getCache($key,$value,600,'category/subcategory')

\Traineratwot\Cache\Cache::call($key,function($v) use ($key){
if(count($key) === 1){
	return $v
	}
	return 'noValue'
},600,'category/subcategory',$value)

\Traineratwot\Cache\Cache::autoRemove()

\Traineratwot\Cache\Cache::removeAll()
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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 ~16 days

Recently: every ~25 days

Total

17

Last Release

1217d ago

Major Versions

1.0.2 → 2.0.12022-05-05

2.2.8 → 3.0.02022-12-21

PHP version history (2 changes)1.0.0PHP &gt;=5.6

3.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/258daf0924571b74f805d1928446978bc93dd75265197ae9ac7dac47c70ddd83?d=identicon)[Traineratwot](/maintainers/Traineratwot)

---

Top Contributors

[![Traineratwot](https://avatars.githubusercontent.com/u/41589091?v=4)](https://github.com/Traineratwot "Traineratwot (35 commits)")

---

Tags

cacheSimplePSR-4

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)[cache/adapter-common

Common classes for PSR-6 adapters

11124.4M38](/packages/cache-adapter-common)[cache/filesystem-adapter

A PSR-6 cache implementation using filesystem. This implementation supports tags

705.8M82](/packages/cache-filesystem-adapter)[cache/array-adapter

A PSR-6 cache implementation using a php array. This implementation supports tags

548.3M151](/packages/cache-array-adapter)[cache/redis-adapter

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

523.9M27](/packages/cache-redis-adapter)[cache/simple-cache-bridge

A PSR-6 bridge to PSR-16. This will make any PSR-6 cache compatible with SimpleCache.

423.1M27](/packages/cache-simple-cache-bridge)

PHPackages © 2026

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