PHPackages                             jejd14/ccache - 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. jejd14/ccache

ActiveLibrary[Caching](/categories/caching)

jejd14/ccache
=============

A small class for caching information

05HTML

Since May 10Pushed 11y ago1 watchersCompare

[ Source](https://github.com/JesperJohnsson/CCache)[ Packagist](https://packagist.org/packages/jejd14/ccache)[ RSS](/packages/jejd14-ccache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/fccb4da905bb8a5eb6fa16784dd367b973692021b87135ca181d9d1c160bd1fa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a65737065724a6f686e73736f6e2f4343616368652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/JesperJohnsson/CCache/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/dccca2190373c3d947433ee35d758f6b5db792653ad0d7d7392a99e4fe02a8b5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a65737065724a6f686e73736f6e2f4343616368652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/JesperJohnsson/CCache/?branch=master) [![Build Status](https://camo.githubusercontent.com/bde73b4fa0838c4dbd631d80da1ad61c8df153cf096a2e03fa765e744d583c7c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a65737065724a6f686e73736f6e2f4343616368652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/JesperJohnsson/CCache/build-status/master)[![License](https://camo.githubusercontent.com/a1a4c55193cece85cadc110ad4c89685a9c8fd55dd4fc57c6cfc68e6a69310f5/68747470733a2f2f706f7365722e707567782e6f72672f646c69642f63646279756d6c2f6c6963656e73652e737667)](https://packagist.org/packages/jejd14/ccache)

CCache
======

[](#ccache)

About
-----

[](#about)

A small class for chaching information

\##Tech

```
PHP >= 5.4.0
Tested on Anax MVC >= 2.0.4
```

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

[](#introduction)

**Instantiate an object of CCache:**

```
$newCCache = new \jejd14\ccache\CCache($dir);
```

**Or instantiate an object of CCache as a shared service within the [Anax](https://github.com/mosbth/Anax-MVC) framework:**

```
$di->setShared('cache', function($dir) {
    $cache = new \jejd14\ccache\CCache($dir);
    return $cache;
});
```

Methods
-------

[](#methods)

1. \_\_construct ( $dir) - *Constructor*
2. get ($key) - *Get an item from the cache if its there.*
3. put ($key, $item) - *Put an item to the cache.*
4. prune($key) - *Prune a item from cache.*
5. pruneAll() - *Prune all items from cache.*

Calling of Methods
------------------

[](#calling-of-methods)

To properly use the methods listed above you can call it as follows (Assuming you've set the service as a shared service in your frontcontroller)

**Inside a class that extends/implements/uses \\Anax\\DI\\TInjectionAware:**

```
$this->di->cache->put('file','hello');
```

**In your frontcontroller:**

```
$app->cache->put('file','hello');
```

**To prune all items from cache:**

```
$app->cache->pruneAll();
```

Composer
--------

[](#composer)

You can add [ccache](https://packagist.org/packages/jejd14/ccache) to your composer.json file like this.

```
"require": {
  "jejd14/ccache": "dev-master"
 }
```

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 14% 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://www.gravatar.com/avatar/6bf612c191c8a1bd74dc6fbccde64b32a458ef8b7da82be6abd744c76ec60aab?d=identicon)[JesperJohnsson](/maintainers/JesperJohnsson)

---

Top Contributors

[![JesperJohnsson](https://avatars.githubusercontent.com/u/9696528?v=4)](https://github.com/JesperJohnsson "JesperJohnsson (27 commits)")

### Embed Badge

![Health badge](/badges/jejd14-ccache/health.svg)

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

###  Alternatives

[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)[cheprasov/php-redis-client

Php client for Redis. It is a fast, fully-functional and user-friendly client for Redis, optimized for performance. RedisClient supports the latest versions of Redis starting from 2.6 to 6.0

1281.2M21](/packages/cheprasov-php-redis-client)[amphp/redis

Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.

165634.7k44](/packages/amphp-redis)

PHPackages © 2026

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