PHPackages                             erip/file-cache-wrapper - 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. erip/file-cache-wrapper

ActiveLibrary[Caching](/categories/caching)

erip/file-cache-wrapper
=======================

Lightweight file caching for php.

0.5(5y ago)018MITPHPPHP &gt;=7.0

Since Jul 17Pushed 5y agoCompare

[ Source](https://github.com/serkanerip/File-Cache-Wrapper)[ Packagist](https://packagist.org/packages/erip/file-cache-wrapper)[ Docs](https://github.com/serkanerip/File-Cache-Wrapper)[ RSS](/packages/erip-file-cache-wrapper/feed)WikiDiscussions master Synced today

READMEChangelog (5)DependenciesVersions (6)Used By (0)

File Cache Wrapper
==================

[](#file-cache-wrapper)

File Cache Wrapper, is a light and simple file cacher. You dont need to handle file operations with file cache wrapper.

Install
-------

[](#install)

Via Composer

```
$ composer require erip/file-cache-wrapper
```

Usage
-----

[](#usage)

```
use Erip\FileCacheWrapper\FileCacheWrapper;

/*
* First parameter is filename. It creates a file in tmp folder with given filename.
* If you give a absolute path that starting with /, it will create file in given path.
* Second parameter is time to cache expire.
* Third parameter is function that you want to cache.
* Fourth parameter is optional disable flag. If you give true flag it wont return cached data.
*/
$getCachedDate = FileCacheWrapper::getCachedFunc("cache.txt", "15 seconds", function()
{
    return date("H:i:s");
});

echo $getCachedDate();
```

Credits
-------

[](#credits)

- [serkanerip](https://github.com/serkanerip)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

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

Every ~1 days

Total

5

Last Release

2174d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8780913?v=4)[Serkan](/maintainers/serkanerip)[@serkanerip](https://github.com/serkanerip)

---

Top Contributors

[![serkanerip](https://avatars.githubusercontent.com/u/8780913?v=4)](https://github.com/serkanerip "serkanerip (11 commits)")

---

Tags

cachingfile caching

### Embed Badge

![Health badge](/badges/erip-file-cache-wrapper/health.svg)

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

###  Alternatives

[psr/simple-cache

Common interfaces for simple caching

8.1k772.9M2.7k](/packages/psr-simple-cache)[symfony/cache

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

4.2k373.5M3.3k](/packages/symfony-cache)[react/cache

Async, Promise-based cache interface for ReactPHP

445131.2M46](/packages/react-cache)[tedivm/stash

The place to keep your cache.

9614.9M128](/packages/tedivm-stash)[overblog/dataloader-php

DataLoaderPhp is a generic utility to be used as part of your application's data fetching layer to provide a simplified and consistent API over various remote data sources such as databases or web services via batching and caching.

2114.6M6](/packages/overblog-dataloader-php)[spatie/blink

Cache that expires in the blink of an eye

1675.6M11](/packages/spatie-blink)

PHPackages © 2026

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