PHPackages                             adinan-cenci/file-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. adinan-cenci/file-cache

ActiveLibrary[Caching](/categories/caching)

adinan-cenci/file-cache
=======================

A PSR-16 implementation around the PHP Filesystem.

2.0.1(5y ago)065MITPHPPHP &gt;=5.3CI failing

Since Mar 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/adinan-cenci/file-cache)[ Packagist](https://packagist.org/packages/adinan-cenci/file-cache)[ RSS](/packages/adinan-cenci-file-cache/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (2)Versions (5)Used By (0)

Caching
=======

[](#caching)

This is a [PSR-16](https://www.php-fig.org/psr/psr-16/) implementation build around the php Filesystem.

How to use it
-------------

[](#how-to-use-it)

Once instantiated, use like specified in the [PSR-16](https://www.php-fig.org/psr/psr-16/)

```
use AdinanCenci\FileCache\Cache;
$cache = new Cache('my-cache-directory/');
```

### Caching

[](#caching-1)

Inform an unique identifier for the data you desire to cache. Optionally you may inform its time to live, otherwise the cached data will never expire.

```
$cache->set('somethingCostlyToAcquire', $value, 60 * 60 * 24);
```

### Caching multiple values at once

[](#caching-multiple-values-at-once)

```
$cache->setMultiple([
    'foo'           => $bar,
    'hello'         => $world,
    'myObject'      => $myObject
], 60 * 60 * 24);
```

### Retrieving

[](#retrieving)

Use ::get to retrieve your data, if the data doesn't exist in cache or has expired then a fallback value will be returned, which defaults to null if not informed.

```
$fallback = 'nothing here';
$cache->get('somethingCostlyToAcquire', $fallback);
```

### Retrieving multiple values at once

[](#retrieving-multiple-values-at-once)

```
$cache->getMultiple([
    'object1',
    'value1',
    'anotherObject'
], $fallback);
```

How to install
--------------

[](#how-to-install)

Use composer

```
composer require adinan-cenci/file-cache
```

License
-------

[](#license)

MIT

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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 ~220 days

Total

4

Last Release

1944d ago

Major Versions

1.0.2 → 2.0.02020-12-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c1eb1b039e965bb307f010fb1dd41fbc79c8c9e9a65324b8f18d2bb9168097d?d=identicon)[AdinanCenci](/maintainers/AdinanCenci)

---

Top Contributors

[![adinan-cenci](https://avatars.githubusercontent.com/u/1629643?v=4)](https://github.com/adinan-cenci "adinan-cenci (7 commits)")

---

Tags

cachepsr-16files

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/adinan-cenci-file-cache/health.svg)

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

###  Alternatives

[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/simple-cache-bridge

A PSR-6 bridge to PSR-16. This will make any PSR-6 cache compatible with SimpleCache.

423.1M27](/packages/cache-simple-cache-bridge)[sabre/cache

Simple cache abstraction layer implementing PSR-16

541.2M3](/packages/sabre-cache)[chillerlan/php-cache

A psr/simple-cache implementation. PHP 8.1+

15211.8k11](/packages/chillerlan-php-cache)[webarchitect609/bitrix-cache

Comfortable fluent interface for Bitrix cache. Anti-stampede cache protection.

2831.2k8](/packages/webarchitect609-bitrix-cache)[codeigniter4/cache

PSR-6 and PSR-16 Cache Adapters for CodeIgniter 4

1320.1k](/packages/codeigniter4-cache)

PHPackages © 2026

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