PHPackages                             emaphp/simplecache - 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. emaphp/simplecache

ActiveLibrary[Caching](/categories/caching)

emaphp/simplecache
==================

A simple cache library for PHP

1.1(11y ago)01621Apache License Version 2.0PHP

Since Oct 16Pushed 11y ago1 watchersCompare

[ Source](https://github.com/emaphp/simplecache)[ Packagist](https://packagist.org/packages/emaphp/simplecache)[ RSS](/packages/emaphp-simplecache/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)DependenciesVersions (3)Used By (1)

simplecache
===========

[](#simplecache)

A simple cache library for PHP

[![Build Status](https://camo.githubusercontent.com/a4c75693deb201c2640bc795a7f41be27b7a46f3b91fe8f2f2c268ab199f1e5f/68747470733a2f2f7472617669732d63692e6f72672f656d617068702f73696d706c6563616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/emaphp/simplecache)

\####Changelog **2014-02-23**

- Moved to PSR-4.
- Added class 'TestProvider'. This class stores values in an internal hash for testing purposes.

\####Description Simplecache is a small PHP library that provides some useful caching classes compatible with APC and Memcache.

\####Dependencies None

\####Installation ```
{
    "require": {
        "emaphp/simplecache": "1.1.*"
    }
}
```

\####Usage ```
include 'vendor/autoload.php';

use SimpleCache\APCProvider;

//create provider
$provider = new APCProvider();

//store value
$provider->store("SimpleCache example", "message", 60);

//obtain value
$message = $provider->fetch('message');

//delete value from cache
$provider->delete('message');

//check for presence
$provider->exists('message'); // returns false
```

\*\*Memcache\*\* There are 2 classes available for memcache servers: *MemcacheProvider* and *MemcachedProvider*. Both must specify the server location during initialization.

```
//memcache
use SimpleCache\MemcacheProvider;

$provider = new MemcacheProvider('localhost', 11211);

//memcached
use SimpleCache\MemcachedProvider;

$provider = new MemcachedProvider();
$provider->addServer('localhost', 11211);
```

\####License Licensed under the Apache License, Version 2.0.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

4139d ago

### Community

Maintainers

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

---

Top Contributors

[![emaphp](https://avatars.githubusercontent.com/u/3780753?v=4)](https://github.com/emaphp "emaphp (23 commits)")

---

Tags

cache apc memcache memcached simplecache

### Embed Badge

![Health badge](/badges/emaphp-simplecache/health.svg)

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

###  Alternatives

[barryvdh/laravel-httpcache

HttpCache for Laravel

502404.4k10](/packages/barryvdh-laravel-httpcache)

PHPackages © 2026

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