PHPackages                             typhoon/opcache - 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. typhoon/opcache

ActiveLibrary[Caching](/categories/caching)

typhoon/opcache
===============

PSR-16 compliant cache that stores values as PHP files, suitable for OPcaching.

0.2.1(2y ago)126.4k↑16.7%MITPHPPHP ^8.1

Since Sep 21Pushed 2y ago2 watchersCompare

[ Source](https://github.com/typhoon-php/opcache)[ Packagist](https://packagist.org/packages/typhoon/opcache)[ RSS](/packages/typhoon-opcache/feed)WikiDiscussions 0.2.x Synced 1mo ago

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

Typhoon OPcache
===============

[](#typhoon-opcache)

[PSR-16](https://www.php-fig.org/psr/psr-16) compliant cache that stores values as PHP files, suitable for OPcaching.

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

[](#installation)

`composer require typhoon/opcache`

Usage
-----

[](#usage)

```
use Typhoon\OPcache\TyphoonOPcache;

$cache = new TyphoonOPcache('path/to/cache/dir');

$cache->set('key', $value);

assert($cache->get('key') == $value);
```

How to configure default TTL
----------------------------

[](#how-to-configure-default-ttl)

According to [PSR-16](https://www.php-fig.org/psr/psr-16/#12-definitions):

> If a calling library asks for an item to be saved but does not specify an expiration time, or specifies a null expiration time or TTL, an Implementing Library MAY use a configured default duration.

Here's how you can configure default TTL:

```
use Typhoon\OPcache\TyphoonOPcache;

$cache = new TyphoonOPcache(
    directory: 'path/to/cache/dir',
    defaultTtl: new DateInterval('T1M'),
);
```

How to delete stale cache items
-------------------------------

[](#how-to-delete-stale-cache-items)

```
use Typhoon\OPcache\TyphoonOPcache;

$cache = new TyphoonOPcache('path/to/cache/dir');
$cache->prune();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

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

Every ~76 days

Total

3

Last Release

816d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2552865?v=4)[Valentin Udaltsov](/maintainers/vudaltsov)[@vudaltsov](https://github.com/vudaltsov)

---

Top Contributors

[![vudaltsov](https://avatars.githubusercontent.com/u/2552865?v=4)](https://github.com/vudaltsov "vudaltsov (10 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/typhoon-opcache/health.svg)

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

###  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/adapter-common

Common classes for PSR-6 adapters

11124.4M38](/packages/cache-adapter-common)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

81733.7k](/packages/flow-php-flow)[amphp/redis

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

165634.7k44](/packages/amphp-redis)[neos/cache

Neos Cache Framework

102.0M31](/packages/neos-cache)

PHPackages © 2026

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