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

ActiveLibrary[Caching](/categories/caching)

soneritics/cache
================

Caching mechanism with support for multiple caching types.

05PHP

Since Mar 23Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Soneritics/Cache)[ Packagist](https://packagist.org/packages/soneritics/cache)[ RSS](/packages/soneritics-cache/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Cache
=====

[](#cache)

[![Build Status](https://camo.githubusercontent.com/e93cdc1518120e06ad099d9a991079acb18c5c6b32d216e23d9c1dcf9c04892d/68747470733a2f2f6170692e7472617669732d63692e6f72672f536f6e657269746963732f43616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Soneritics/Cache)[![Coverage Status](https://camo.githubusercontent.com/9b144eb873c31264238e44b0602572ac3346cd210501c13677fd15de2fe70fd3/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f536f6e657269746963732f43616368652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/Soneritics/Cache?branch=master)[![License](https://camo.githubusercontent.com/505fe3a551fc6e64816f64cee81471b04e7ef943170e4f994c249982b3fd4290/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](https://camo.githubusercontent.com/505fe3a551fc6e64816f64cee81471b04e7ef943170e4f994c249982b3fd4290/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)

by

- [@Soneritics](https://github.com/Soneritics) - Jordi Jolink

Introduction
------------

[](#introduction)

Caching interfaces and implementation of caching methods.

Minimum Requirements
--------------------

[](#minimum-requirements)

- PHP 5.5+

Features
--------

[](#features)

Currently supports the following caches:

- TextCache
- FileCache
- MemCache
- ArrayCache
- SessionCache

### Example

[](#example)

```
$textCache = (new TextCache('tmp'))
    ->setCacheExpiration(4)
    ->set('test', 'test');

echo $textCache->get('test');
// sleep(5);
// $textCache->has('test') === false

$fileCache = (new FileCache('tmp'))
    ->setCacheExpiration(3600)
    ->set('test', ['test1', 'test2']);

var_dump($fileCache->get('test'));
$fileCache->clear('test');
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3717850?v=4)[Jordi Jolink](/maintainers/soneritics)[@Soneritics](https://github.com/Soneritics)

---

Top Contributors

[![Soneritics](https://avatars.githubusercontent.com/u/3717850?v=4)](https://github.com/Soneritics "Soneritics (14 commits)")

### Embed Badge

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

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

PHPackages © 2026

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