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

ActiveLibrary[Caching](/categories/caching)

effectra/cache
==============

The Effectra Cache package.

v1.0.0(2y ago)1261MITPHP

Since Jul 12Pushed 2y agoCompare

[ Source](https://github.com/effectra/cache)[ Packagist](https://packagist.org/packages/effectra/cache)[ RSS](/packages/effectra-cache/feed)WikiDiscussions main Synced 1mo ago

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

Effectra\\Cache
===============

[](#effectracache)

Effectra\\Cache is a package that provides cache implementations based on the PSR-16 (Simple Cache) standard. It includes cache classes that can be used to store and retrieve data in various cache storage systems.

Features
--------

[](#features)

- PSR-16 compatibility: Implements the `Psr\SimpleCache\CacheInterface`.
- Easy integration: Provides cache implementations for different cache storage systems.
- Flexible configuration: Supports different cache configurations based on the chosen storage system.
- Clean and simple API: Offers a straightforward API for caching data.

Installation
------------

[](#installation)

You can install the package via Composer. Run the following command in your project directory:

```
composer require effectra/cache
```

Usage
-----

[](#usage)

The package includes various cache classes, each representing a different cache storage system. You can use the desired cache class based on your requirements. Here's an example of using the `JsonCache` class:

```
use Effectra\Cache\Psr16\JsonCache;

// Create an instance of the JsonCache class with the cache directory
$cache = new JsonCache('/path/to/cache/directory');

// Store a value in the cache with a key and optional time-to-live (TTL)
$cache->set('key', 'value', 3600); // Cache value with a TTL of 1 hour

// Retrieve a value from the cache
$result = $cache->get('key');

// Delete a value from the cache
$cache->delete('key');

// Clear the entire cache
$cache->clear();
```

Available Cache Classes
-----------------------

[](#available-cache-classes)

- `FileCache`: Stores cache data in individual files on the file system.
- `JsonCache`: Stores cache data in JSON files on the file system.
- `RedisCache`: Stores cache data in a Redis server.

Please refer to the respective class documentation and the PSR-16 specification for more details on the methods and usage.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.2
- Composer (for installation)

Contributing
------------

[](#contributing)

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

License
-------

[](#license)

This package is open source and available under the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1041d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e6219ae87e98df8783b2f595b013035dd183c0712afd24045a8acf0a40c3bdf?d=identicon)[effectra](/maintainers/effectra)

---

Top Contributors

[![BMTmohammedtaha](https://avatars.githubusercontent.com/u/95439605?v=4)](https://github.com/BMTmohammedtaha "BMTmohammedtaha (6 commits)")

### Embed Badge

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

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

###  Alternatives

[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k348.9M2.5k](/packages/symfony-cache)[laminas/laminas-cache

Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output

1076.9M130](/packages/laminas-laminas-cache)[cache/predis-adapter

A PSR-6 cache implementation using Redis (Predis). This implementation supports tags

272.6M13](/packages/cache-predis-adapter)[neos/cache

Neos Cache Framework

102.0M31](/packages/neos-cache)[cache/redis-adapter

A PSR-6 cache implementation using Redis (PhpRedis). This implementation supports tags

523.9M27](/packages/cache-redis-adapter)[cache/void-adapter

A PSR-6 cache implementation using Void. This implementation supports tags

183.0M44](/packages/cache-void-adapter)

PHPackages © 2026

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