PHPackages                             i80586/rcache - 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. i80586/rcache

ActiveLibrary[Caching](/categories/caching)

i80586/rcache
=============

Simple caching library

04PHP

Since Nov 22Pushed 7y agoCompare

[ Source](https://github.com/i80586/RCache)[ Packagist](https://packagist.org/packages/i80586/rcache)[ RSS](/packages/i80586-rcache/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (3)Used By (0)

RCache
======

[](#rcache)

[![Build Status](https://camo.githubusercontent.com/5fb1b58babd1353cd6c8257c578ab1afecc38ee4037f2c085f43ba8a0d8664d5/68747470733a2f2f7472617669732d63692e6f72672f6938303538362f5243616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/i80586/RCache)[![Total Downloads](https://camo.githubusercontent.com/8a2785dd62fc87616a6525d6a79f472b531e2f30c3027112b6ac6c7a3ecffa54/68747470733a2f2f706f7365722e707567782e6f72672f6938303538362f7263616368652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/i80586/rcache)

Simple PHP library for caching data in files and memory

### Installing via Composer

[](#installing-via-composer)

The recommended way to install RCache is through [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, add following string into the composer.json file:

```
{
    ...
    "require" : {
        ...
         "i80586/rcache": "dev-master"
        ...
    }
    ...
}
```

Now you can update composer packages via

```
composer update
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

Examples
--------

[](#examples)

#### File cache (manually cache)

[](#file-cache-manually-cache)

```
use RCache\Cache;
use RCache\FileCache;

$cache = new Cache(new FileCache(__DIR__ . '/cache'));

// save data in cache
$cache->set('country', [
		'city' => 'Baku',
		'country' => 'Azerbaijan'
	], 3600);

// get cache by identifier
$country = $cache->get('country');

// remove cache
$cache->drop('country');
```

#### File cache (content cache)

[](#file-cache-content-cache)

```
use RCache\Cache;
use RCache\FileCache;

$cache = new Cache(new FileCache(__DIR__ . '/cache'));

...other HTML content...

    ...content to be cached...

...other HTML content...
```

#### Memory cache (manually cache)

[](#memory-cache-manually-cache)

```
use RCache\Cache;
use RCache\MemCache;

$cache = new Cache(new MemCache());

// save data in cache
$cache->set('country', [
		'city' => 'Baku',
		'country' => 'Azerbaijan'
	], 3600);

// get cache by identifier
$country = $cache->get('country');

// remove cache
$cache->drop('country');
```

#### Memory cache (content cache)

[](#memory-cache-content-cache)

```
use RCache\Cache;
use RCache\MemCache;

$cache = new Cache(new MemCache());

...other HTML content...

    ...content to be cached...

...other HTML content...
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

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/9024308100ab8ee1957d123926897d01e68eb25ef8b0c108d918f094be716ddb?d=identicon)[i80586](/maintainers/i80586)

---

Top Contributors

[![i80586](https://avatars.githubusercontent.com/u/3355250?v=4)](https://github.com/i80586 "i80586 (20 commits)")

### Embed Badge

![Health badge](/badges/i80586-rcache/health.svg)

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

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[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)

PHPackages © 2026

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