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

AbandonedArchivedLibrary[Caching](/categories/caching)

kasseler/cache
==============

Cache library

1.0.2(11y ago)244MITPHPPHP &gt;=5.4.0

Since Mar 15Pushed 11y ago1 watchersCompare

[ Source](https://github.com/RobinCK/cache)[ Packagist](https://packagist.org/packages/kasseler/cache)[ Docs](http://kasseler-cms.net)[ RSS](/packages/kasseler-cache/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Cache Component
===============

[](#cache-component)

[![Build Status](https://camo.githubusercontent.com/303d887be98954e7816287d2b87d5360fa7802acca30ce393839039f18df89cf/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f526f62696e434b2f63616368652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/RobinCK/cache/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/90ee7ecb71f645f6721f6a294468096c88bbdd0c1f11c7de151df5329e2ad4e1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f526f62696e434b2f63616368652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/RobinCK/cache/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/9a5ee6a5cb40345a7f7f6ccdd05e7d90816d5773cc9ce3bbc023cc36c1442e12/68747470733a2f2f706f7365722e707567782e6f72672f6b617373656c65722f63616368652f762f737461626c652e737667)](https://packagist.org/packages/kasseler/cache)[![Total Downloads](https://camo.githubusercontent.com/27bca1df10decffc481a3fa7955dbef0b64df8656b567eb59060136d22eb8009/68747470733a2f2f706f7365722e707567782e6f72672f6b617373656c65722f63616368652f646f776e6c6f6164732e737667)](https://packagist.org/packages/kasseler/cache)[![Latest Unstable Version](https://camo.githubusercontent.com/419f3e909d8649359e9281262cc41eb33dc78a0a5b0d71e70795c6adda51e6f6/68747470733a2f2f706f7365722e707567782e6f72672f6b617373656c65722f63616368652f762f756e737461626c652e737667)](https://packagist.org/packages/kasseler/cache)[![License](https://camo.githubusercontent.com/4316defa6e044fd31e3a9cc3eb93c3aa5ed9aab0024d5b8249dcd7936f44c7b4/68747470733a2f2f706f7365722e707567782e6f72672f6b617373656c65722f63616368652f6c6963656e73652e737667)](https://packagist.org/packages/kasseler/cache)

Cache library. Implements different adapters.

### Requirements

[](#requirements)

- PHP &gt;= 5.4
- predis/predis ~1.0

### Installation

[](#installation)

```
$ composer require kasseler/cache
```

Usage
=====

[](#usage)

```
$cache = new Cache(new ArrayCache());
$cache->set('foo', [1,2,3,4,5]);
if ($cache->has('foo')) {
    var_export($cache->get('foo')->data());
}
$cache->drop();
```

Adapters
========

[](#adapters)

### Array

[](#array)

```
$cache = new Cache(new ArrayCache());
```

### Apc

[](#apc)

```
$cache = new Cache(new ApcCache());
```

### File

[](#file)

```
$cache = new Cache(new FileCache());
```

### Memcache

[](#memcache)

```
$cache = new Cache(new MemcacheCache());
```

### Memcached

[](#memcached)

```
$cache = new Cache(new MemcachedCache());
```

### MongoDB

[](#mongodb)

```
$cache = new Cache(new MongoDBCache());
```

### Predis

[](#predis)

```
$cache = new Cache(new PredisCache());
```

### Redis

[](#redis)

```
$cache = new Cache(new RedisCache());
```

### Session

[](#session)

```
$cache = new Cache(new SessionCache());
```

### SQLite3

[](#sqlite3)

```
$cache = new Cache(new SQLite3Cache());
```

### Void

[](#void)

```
$cache = new Cache(new VoidCache());
```

### Xcache

[](#xcache)

```
$cache = new Cache(new XcacheCache());
```

Speed testing
=============

[](#speed-testing)

Test was conducted on php 5.6.

10K set10K set10K get10K get10K has10K hastime, secmemory, Kbtime, secmemory, Kbtime, secmemory, Kb**Session**1,05915136,7890104,26211933,589368,275911933,5781**File**55,353219,9011,269620,07811,909119,0937**Mongo**16,404919,367113,965820,359313,900819,375**Predis**2,2291138,73432,1721137,6251,6831133,1796**Redis**1,273127,14841,115127,19530,78622,6562**Memcache**1,2527,33591,868127,78900,81423,1953**APC**0,925117,72651,133117,80460,44113,226**Xcache**0,83217,91400,973117,04680,43913,4531**Void**0,14717,35930,00513,03900,17413,1718

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

4120d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24ea64ad06776e5f6ad1e3d4e2bceb16dab50e52445699db7d6f942cd91de3eb?d=identicon)[kasseler](/maintainers/kasseler)

---

Top Contributors

[![RobinCK](https://avatars.githubusercontent.com/u/10226014?v=4)](https://github.com/RobinCK "RobinCK (11 commits)")

---

Tags

cachepredismemcachedapcfile cachemango

### Embed Badge

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

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

###  Alternatives

[tedivm/stash

The place to keep your cache.

9614.9M128](/packages/tedivm-stash)[tedivm/stash-bundle

Incorporates the Stash caching library into Symfony.

871.4M16](/packages/tedivm-stash-bundle)[sabre/cache

Simple cache abstraction layer implementing PSR-16

551.3M5](/packages/sabre-cache)[ihor/cachalot

Cache a lot in a proper way (APC, XCache, Memcached, Redis, Couchbase)

2528.4k](/packages/ihor-cachalot)

PHPackages © 2026

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