PHPackages                             artdevue/fcache - 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. artdevue/fcache

ActiveLibrary[Caching](/categories/caching)

artdevue/fcache
===============

Driver file cache, separation key-folder, Laravel 4 integration

71503PHP

Since Jun 26Pushed 12y ago3 watchersCompare

[ Source](https://github.com/artdevue/Fcache)[ Packagist](https://packagist.org/packages/artdevue/fcache)[ RSS](/packages/artdevue-fcache/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

File cache driver - Fcache
==========================

[](#file-cache-driver---fcache)

========

**File cache driver distrubutes cache to folders depending to key-parameter. This is Laravel 4 integration of Fcache.**

Quick Start
-----------

[](#quick-start)

You can install this Fcache class quickly and easily with Composer.

Edit your composer.json and add next:

```
"artdevue/fcache": "dev-master"
```

Run Composer to install or update the new dependencies:

```
$ composer update
```

Laravel 4 Integration
---------------------

[](#laravel-4-integration)

The Fcache Cache class supports Laravel 4 integration. Best practice is to add the ServiceProvider of the Intervention Fcache in Laravel 4 installment.

Open your Laravel config file config/app.php and add the following:

In the *$providers* section add service providers for this package.

```
'Artdevue\Fcache\FcacheServiceProvider'
```

Open your Laravel global file start/global.php and add the following lines.

```
Cache::extend('fcache', function($app)
{
    $store = new Artdevue\Fcache\Fcache;
    return new Illuminate\Cache\Repository($store);
});
```

Usage
-----

[](#usage)

Open your Laravel config file config/cache.php and change driver to fcache.

```
'driver' => 'fcache',
```

**Note!** All commands are identical to the driver file cache, except *forget*

To create a directory cache it is enough to separate the slash key directory, the file will be the last word.

For example, create the key *folder/onesubfolder/onefile*.

```
Cache::put('folder/onesubfolder/onefile', 'value', $minutes);
```

The system automatically will create subfolders - *folder* and *onesubfolder*, and the file *onefile.cache*

```
folder
	onesubfolder
		onefile.cache
		twofile.cache
	twosubfolder
		onefile.cache
		twofile.cache
file.cache
```

With the file cache Fcache you can delete the entire cache, and the cache folder. To delete a file *folder/onesubfolder/onefile.cache*

```
Cache::forget('folder/onesubfolder/onefile');
```

If you need to remove all the files in a directory *folder/onesubfolder*, then change the key to *folder/onesubfolder*.

```
Cache::forget('folder/onesubfolder');
```

You can group your cache folders, it gives you ability to delete the whole group cache files.

Using tags
----------

[](#using-tags)

Also file driver Fcache works with Tags. When you add a cache, you can use comma-separated parameter *tags*. Example:

```
Cache::tags('country,all')->put('key', 'value', $minutes);
```

or

```
$value = Cache::tags('users,all')->rememberForever('users', function()
{
   return DB::table('users')->get();
});
```

Now you can easily remove any cache tag. For example, to delete the cache tag with the *users*:

```
Cache::forgetTags('users');
```

**Note!** If you want to delete the cache with different tags, assign comma-separated tags. For example:

```
Cache::forgetTags('users,all');
```

### Authors

[](#authors)

  [![](https://camo.githubusercontent.com/6d586084e5117eeef08a159697e86686d8f0eab265656795a8ebcd11e7ae50f9/687474703a2f2f7777772e67726176617461722e636f6d2f6176617461722f33396566316337343064656666373062303534633164396165386638366430323f733d3630)](https://camo.githubusercontent.com/6d586084e5117eeef08a159697e86686d8f0eab265656795a8ebcd11e7ae50f9/687474703a2f2f7777772e67726176617461722e636f6d2f6176617461722f33396566316337343064656666373062303534633164396165386638366430323f733d3630)Valentin Rasulov
artdevue.com

###  Health Score

24

—

LowBetter than 30% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1194985?v=4)[Valentyn Rasulov](/maintainers/artdevue)[@artdevue](https://github.com/artdevue)

---

Top Contributors

[![artdevue](https://avatars.githubusercontent.com/u/1194985?v=4)](https://github.com/artdevue "artdevue (7 commits)")

### Embed Badge

![Health badge](/badges/artdevue-fcache/health.svg)

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

###  Alternatives

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)[phpfastcache/phpssdb

PHP SSDB Driver for phpFastCache

14736.9k1](/packages/phpfastcache-phpssdb)[rapidwebltd/rw-file-cache

RW File Cache is a PHP File-based Caching Library. Its syntax is designed to closely resemble the PHP memcache extension.

15196.8k7](/packages/rapidwebltd-rw-file-cache)[yuzuru-s/redis-recommend

Wrapping Redis's sorted set APIs for specializing recommending operations.

392.9k](/packages/yuzuru-s-redis-recommend)[ichhabrecht/intcache

Turn uncachable page objects into cacheable links

193.9k](/packages/ichhabrecht-intcache)

PHPackages © 2026

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