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

ActiveLibrary[Caching](/categories/caching)

quillphp/cache
==============

Unified PSR-16 cache abstraction for the Quill PHP framework

0.0.1(yesterday)010↑500%MITPHPPHP ^8.3

Since Apr 6Pushed yesterdayCompare

[ Source](https://github.com/quillphp/quill-cache)[ Packagist](https://packagist.org/packages/quillphp/cache)[ Docs](https://quillphp.com)[ RSS](/packages/quillphp-cache/feed)WikiDiscussions main Synced today

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

Quill Cache
===========

[](#quill-cache)

Unified [PSR-16](https://www.php-fig.org/psr/psr-16/) Cache abstraction for the [Quill PHP Framework](https://quillphp.com).

This package provides a simplified caching interface with support for multiple backends, allowing you to switch between in-memory, local filesystem, or distributed storage with a single configuration change.

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

[](#installation)

```
composer require quillphp/cache
```

Features
--------

[](#features)

- **PSR-16 Compliant**: Implements the standard `Psr\SimpleCache\CacheInterface`.
- **Multiple Drivers**:
    - `ArrayDriver`: In-memory caching for testing or single-request lifecycles.
    - `FileDriver`: Persistent filesystem-based caching.
    - `ApcuDriver`: High-performance shared memory caching via APCu.
    - `RedisDriver`: Distributed caching via Redis.
- **CacheManager**: Fluent API for managing and selecting active drivers.
- **Service Provider**: Automatic integration with the Quill DI container.

Usage
-----

[](#usage)

### Basic Caching

[](#basic-caching)

```
use Quill\Cache\CacheManager;
use Quill\Cache\ArrayDriver;

$cache = new CacheManager('array');
$cache->addDriver('array', new ArrayDriver());

$cache->set('key', 'value', 3600);
$value = $cache->get('key');
```

### Integration with Quill App

[](#integration-with-quill-app)

Register the cache system using the `CacheServiceProvider`:

```
use Quill\Cache\CacheServiceProvider;

$app = new \Quill\App();

CacheServiceProvider::register($app, [
    'driver' => 'file',
    'path'   => __DIR__ . '/storage/cache',
    'prefix' => 'my_app:'
]);

// Access via DI in handlers:
$app->get('/data', function(\Quill\Cache\CacheManager $cache) {
    return $cache->get('some_data');
});
```

### Available Drivers

[](#available-drivers)

#### File Driver

[](#file-driver)

```
$driver = new \Quill\Cache\FileDriver(__DIR__ . '/cache');
```

#### APCu Driver

[](#apcu-driver)

```
$driver = new \Quill\Cache\ApcuDriver('prefix:');
```

#### Redis Driver

[](#redis-driver)

Requires a `Redis` instance (ext-redis or compatible):

```
$redis = new \Redis();
$redis->connect('127.0.0.1');

$driver = new \Quill\Cache\RedisDriver($redis, 'prefix:');
```

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance100

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4742b2ad737c14793d6b0a418e6da90b446153a4d7ba120a1f3c07e2a2951d28?d=identicon)[quillphp](/maintainers/quillphp)

---

Top Contributors

[![fr3on](https://avatars.githubusercontent.com/u/26393383?v=4)](https://github.com/fr3on "fr3on (1 commits)")

---

Tags

phprediscachepsr-16fileapcuquill

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[desarrolla2/cache

Provides an cache interface for several adapters Apc, Apcu, File, Mongo, Memcache, Memcached, Mysql, Mongo, Redis is supported.

1322.5M46](/packages/desarrolla2-cache)[sabre/cache

Simple cache abstraction layer implementing PSR-16

541.2M3](/packages/sabre-cache)

PHPackages © 2026

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