PHPackages                             truongwp/php-static-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. truongwp/php-static-cache

ActiveLibrary[Caching](/categories/caching)

truongwp/php-static-cache
=========================

PHP caching class uses static variable to cache data during runtime

0.1.0(8y ago)028MITPHP

Since Aug 28Pushed 8y ago1 watchersCompare

[ Source](https://github.com/truongwp/php-static-caching)[ Packagist](https://packagist.org/packages/truongwp/php-static-cache)[ RSS](/packages/truongwp-php-static-cache/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (0)

PHP caching class uses static variable to cache data during runtime

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

[](#installation)

Use composer to include the library:

```
composer require truongwp/php-static-cache

```

Example
-------

[](#example)

```
$static_cache = new \Truongwp\StaticCache();

if ( $static_cache->has( 'key' ) ) {
	$value = $static_cache->get( 'key' );
} else {
	$value = do_something();
	$static_cache->set( 'key', $value );
}
```

###  Health Score

24

—

LowBetter than 30% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

3274d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19748318?v=4)[Truong Giang](/maintainers/truongwp)[@truongwp](https://github.com/truongwp)

---

Top Contributors

[![truongwp](https://avatars.githubusercontent.com/u/19748318?v=4)](https://github.com/truongwp "truongwp (3 commits)")

---

Tags

cachecachingphpphp-library

### Embed Badge

![Health badge](/badges/truongwp-php-static-cache/health.svg)

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

###  Alternatives

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)

PHPackages © 2026

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