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

ActiveLibrary[Caching](/categories/caching)

mlevent/file-cache
==================

PHP için basit dosya tipi cache paketi.

v0.1.0(2y ago)1101MITPHPPHP ^8.0

Since Aug 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mlevent/file-cache)[ Packagist](https://packagist.org/packages/mlevent/file-cache)[ Docs](https://github.com/mlevent/file-cache)[ RSS](/packages/mlevent-file-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (1)

🗳️ file-cache
=============

[](#️-file-cache)

PHP için basit, dosya tipi önbellek sınıfı.

[![](https://camo.githubusercontent.com/6f78a65c1830a8a93ee17e065568ef0810c2e99a741ecd461b7e3f5a93775d7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6d6c6576656e742f66696c652d63616368652f7068703f7374796c653d706c6173746963)](https://camo.githubusercontent.com/6f78a65c1830a8a93ee17e065568ef0810c2e99a741ecd461b7e3f5a93775d7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6d6c6576656e742f66696c652d63616368652f7068703f7374796c653d706c6173746963)[![](https://camo.githubusercontent.com/f25257a75c2e3cae6cc7bb16c312944426f70da32840d2cb1ddcd74a236e6388/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6c6576656e742f66696c652d63616368653f7374796c653d706c6173746963)](https://camo.githubusercontent.com/f25257a75c2e3cae6cc7bb16c312944426f70da32840d2cb1ddcd74a236e6388/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6c6576656e742f66696c652d63616368653f7374796c653d706c6173746963)[![](https://camo.githubusercontent.com/cd1962503c1e75db75cefe0bd419ac443952c6742dae1452851599c5f2491a06/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6d6c6576656e742f66696c652d63616368653f7374796c653d706c6173746963)](https://camo.githubusercontent.com/cd1962503c1e75db75cefe0bd419ac443952c6742dae1452851599c5f2491a06/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6d6c6576656e742f66696c652d63616368653f7374796c653d706c6173746963)[![](https://camo.githubusercontent.com/0a386abf95acd83d59cfdc00b272fb8b94948f5e7299f11721ead67bec0e29d4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6d6c6576656e742f66696c652d63616368653f7374796c653d706c6173746963)](https://camo.githubusercontent.com/0a386abf95acd83d59cfdc00b272fb8b94948f5e7299f11721ead67bec0e29d4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6d6c6576656e742f66696c652d63616368653f7374796c653d706c6173746963)[![](https://camo.githubusercontent.com/62df2359b1884ac02c91b93751c5f509ced987b0fa9b4287755c8729a65c6fd1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6c6576656e742f66696c652d63616368653f7374796c653d706c6173746963)](https://camo.githubusercontent.com/62df2359b1884ac02c91b93751c5f509ced987b0fa9b4287755c8729a65c6fd1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6c6576656e742f66696c652d63616368653f7374796c653d706c6173746963)[![](https://camo.githubusercontent.com/031ed42a65a230a8227ebf322c366d1f345f13488960a57309f50443a5ed9c3d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6d6c6576656e742f66696c652d63616368653f7374796c653d706c6173746963)](https://camo.githubusercontent.com/031ed42a65a230a8227ebf322c366d1f345f13488960a57309f50443a5ed9c3d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6d6c6576656e742f66696c652d63616368653f7374796c653d706c6173746963)[![](https://camo.githubusercontent.com/61e66aef3f7286104d0100db7f9a71c29b1d2d42f8064c3addb4f367ab1b92f2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6d6c6576656e742f66696c652d63616368653f7374796c653d706c6173746963)](https://camo.githubusercontent.com/61e66aef3f7286104d0100db7f9a71c29b1d2d42f8064c3addb4f367ab1b92f2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6d6c6576656e742f66696c652d63616368653f7374796c653d706c6173746963)

Kurulum
-------

[](#kurulum)

🛠️ Paketi composer ile projenize dahil edin;

```
composer require mlevent/file-cache
```

Örnek Kullanım
--------------

[](#örnek-kullanım)

```
use Mlevent\FileCache\FileCache;

$cache = new FileCache;

$updatedTime = $cache->refresh('updatedTime', function () {
    return date("H:i:s");
}, 60);

echo "Updated time: {$updatedTime}";
```

Önbellek dosyaları varsayılan olarak `./cache` dizininde saklanır;

```
$ tree ./cache
./cache
└── f7
    └── d1
        └── 7411a1eeb3dabcc2311f04eeb5371f0f40f192f3.cache

```

Geleneksel kullanım şekline örnek olarak;

```
use Mlevent\FileCache\FileCache;

// Önbellek dosyaları ./cache dizininde saklanacak
$cache = new FileCache('./cache');

// Geçerlilik süresi dolduysa
if ($cache->isExpired('updatedTime')) {

    // Geçerlilik süresini 60 saniye daha uzat ve yeni veriyi yaz
    $cache->put('updatedTime', date("H:i:s"), 60);
}

// Veriyi önbellekten oku
$updatedTime = $cache->get('updatedTime');

echo "Updated time: {$updatedTime}";
```

```
/**
 * @return bool
 */
$cache->has(string $name);

/**
 * @return bool
 */
$cache->delete(string $name);

/**
 * @return void
 */
$cache->flush();

/**
 * @return array
 */
$cache->getStore();
```

📧İletişim
---------

[](#i̇letişim)

İletişim için  adresine e-posta gönderin.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

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

992d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/05bb9553ee107aea561f3d6b82d5b54bb3172b5800aaf6bc40f4998d62c7d297?d=identicon)[mlevent](/maintainers/mlevent)

---

Top Contributors

[![mlevent](https://avatars.githubusercontent.com/u/5323354?v=4)](https://github.com/mlevent "mlevent (9 commits)")

---

Tags

cachefile-cachephpstore

### Embed Badge

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

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

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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