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

ActiveLibrary[Caching](/categories/caching)

validus/cache
=============

Provides cache for your Expressive project.

v1.1(7y ago)117MITPHPPHP ^7.1CI failing

Since Oct 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ValidusPHP/cache)[ Packagist](https://packagist.org/packages/validus/cache)[ Docs](https://github.com/ValidusPHP/cache)[ RSS](/packages/validus-cache/feed)WikiDiscussions add-stickler-config Synced 3d ago

READMEChangelog (3)Dependencies (10)Versions (5)Used By (0)

Validus Cache
=============

[](#validus-cache)

Provides caching implementations for zend expressive projects.

---

[![Packagist](https://camo.githubusercontent.com/d04392c3963774d6684be1dbaea1898049c4c74167d3614fd2cdad2b7973320b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f76616c696475732f63616368652e737667)](https://packagist.org/packages/validus/cache) [![GitHub license](https://camo.githubusercontent.com/d79bfe908af26bedb0b3ae44b7ead1a22312a6f7a7c6d48592ba56b1ac0b3683/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f56616c696475735048502f63616368652e737667)](https://github.com/ValidusPHP/cache/blob/master/LICENSE) [![Build Status](https://camo.githubusercontent.com/d157ed2f20688b332847e0e518cd2c6443d8c978267488d62495d92f82625b32/68747470733a2f2f7472617669732d63692e6f72672f56616c696475735048502f63616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ValidusPHP/cache) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/1e248de1d32cfa1baaf18fd7f0ecc8453a43230c0186fb0d7a9b977e8f04e60f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f56616c696475735048502f63616368652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ValidusPHP/cache/?branch=master) [![Code Intelligence Status](https://camo.githubusercontent.com/79243e9b8ed1ed0887408010a496497769369bbe5fc8366d0853533834500181/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f56616c696475735048502f7472616e736c6174696f6e2f6261646765732f636f64652d696e74656c6c6967656e63652e737667)](https://scrutinizer-ci.com/code-intelligence) [![Coverage Status](https://camo.githubusercontent.com/38ea589fd590f4ae1fd63675e007b9883c8926586eb1f9932ac5aa6450f62813/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f56616c696475735048502f63616368652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/ValidusPHP/cache)

---

PSR-6 and PSR-16 Cache factories for PSR-11 with Zend configuration provider.

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

[](#installation)

The easiest way to install this package is through composer:

```
$ composer require validus/cache
```

Configuration
-------------

[](#configuration)

A complete example configuration can be found in example/full-config.php. Please note that the values in there are the defaults, and don't have to be supplied when you are not changing them. Keep your own configuration as minimal as possible. A minimal configuration can be found in example/simple-config.php

If your application uses the zend-component-installer Composer plugin, your configuration is complete; the shipped `Validus\Cache\ConfigProvider` registers the cache service.

#### Accessing the cache adapter

[](#accessing-the-cache-adapter)

you can access the cache implementation via the container :

```
use Psr\Cache\CacheItemPoolInterface;
use Psr\SimpleCache\CacheInterface;

// $pool instanceof CacheItemPoolInterface
$pool = $container->get(CacheItemPoolInterface::class);

// $cache instanceof CacheInterface
$cache = $container->get(CacheInterface::class);
```

#### Middleware

[](#middleware)

Validus cache package comes with a `CacheResetMiddleware`, allowing you to reset the cache pool to its initial status after every request.

you can add the middleware to your `config/pipeline.php` file like this :

```
    $app->pipe(\Validus\Cache\Middleware\CacheResetMiddleware::class);
```

a factory for the middleware is already provided in the config provider so you don't have to worry about that as long as you are using zend-component-installer composer plugin.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 92.3% 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

Every ~2 days

Total

3

Last Release

2775d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8489d7c85bfa7c637b8e13484f3f659652aea0568b6e7f9e66edeb0649b5a2f1?d=identicon)[azjezz](/maintainers/azjezz)

---

Top Contributors

[![azjezz](https://avatars.githubusercontent.com/u/29315886?v=4)](https://github.com/azjezz "azjezz (12 commits)")[![stickler-ci](https://avatars.githubusercontent.com/u/16011037?v=4)](https://github.com/stickler-ci "stickler-ci (1 commits)")

---

Tags

cachephppsr-11psr-16psr-6symfony-cachezendzend-expressivePSR-11zend-expressivesymfony-cachecontainer-interop-cache

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5723.1M30](/packages/thecodingmachine-graphqlite)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[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)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)

PHPackages © 2026

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