PHPackages                             esemve/vanillacache - 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. esemve/vanillacache

ActiveLibrary[Caching](/categories/caching)

esemve/vanillacache
===================

Powerful cache engine for Laravel 5

0.0.1(10y ago)118MITPHP &gt;=5.6

Since Apr 24Compare

[ Source](https://github.com/esemve/VanillaCache)[ Packagist](https://packagist.org/packages/esemve/vanillacache)[ RSS](/packages/esemve-vanillacache/feed)WikiDiscussions Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Vanilla Cache (v0.0.1)
======================

[](#vanilla-cache-v001)

Vanilla Cache is a Cache System for Laravel 5.X. It's a response cache system, so you can cache the full html response, and **serve this next time without booting Laravel**.

You can use this in shared webserver. The request time is max 10-20ms with this cache.

### It's a dev version! Please don't use this in live project!

[](#its-a-dev-version-please-dont-use-this-in-live-project)

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

[](#installation)

```
composer require esemve/vanillacache –dev
```

Add to providers:

```
Esemve\VanillaCache\CacheServiceProvider::class
```

Add to Facades:

```
'Vanilla' => Esemve\VanillaCache\Facades\Vanilla::class
```

After:

```
composer dump-autoload
php artisan vendor:publish
```

You can create a cache from Laravel now!

Next step is to set up the CacheServer. It will serve cache BEFORE laravel has loaded. Add to your composer.json "autoload" section beginning:

```
"files": ["config/vanilla.php","vendor/esemve/vanillacache/vanilla/CacheServer.php"],
```

Why is the config/vanilla.php is so weird?
------------------------------------------

[](#why-is-the-configvanillaphp-is-so-weird)

Because it is loading BEFORE Laravel, so you can't use any Laravel specified function in this file!

How to use?
-----------

[](#how-to-use)

```
use \Vanilla;
…

  public function index(RoomRepository $roomRepository)
    {
        $rooms = $roomRepository->getAll();

        return Vanilla::Cache(View::make('cinema.index',[
            'rooms' => $rooms
        ]),10);
    }
```

**Vanilla::Cache($view,$sec)**

Saves the view content for the actual url (include GET parameters) for 10 sec. If less than in 10 sec any user open this url, the CacheServer will serve the cache without booting Laravel.

Engines
-------

[](#engines)

VanillaCache contains a file engine default. You can create an engine (for example: mysql, redis etc).

How can you create an engine?
-----------------------------

[](#how-can-you-create-an-engine)

config/vanilla.php

```
'file' => [
	    'laravel' => 'Esemve\\VanillaCache\\Engines\\FileEngine',
	    'vanilla' => __DIR__.'/../vendor/esemve/vanillacache/vanilla/Engines/FileEngine.php',
	    'config' => [
		'storage_folder' => realpath(__DIR__.'/../storage/').'/vanilla/'
	    ]
	]
```

**„file”:** name of engine

**In „laravel” =&gt; 'xxx'** section fills a namespace for your cache engine. The Esemve\\VanillaCache\\Engines\\Engine interface must be implemented. This engine is live IN Laravel

**In „vanilla” =&gt; 'xxx'** section can set up the engine file what loading BEFORE laravel. It must implement Esemve\\VanillaCache\\Interfaces\\EngineInterface. It will serve the cache content to CacheServer.

**The „config” section** will send to your engine.

Dinamic content / blocks (Similar SSI)
--------------------------------------

[](#dinamic-content--blocks-similar-ssi)

All page contains dynamic or repeted elements, for example right side, menus etc. From this elements you can generate a HTML, and you can include it to your cache.

Generate a HTML for cache:

**Vanilla::storeHtml(„rightSide”,view(„\_partials.rightSide”))**

After this you can use a **&lt;##html:##&gt;** tag in your page.

```

...

…
...

```

The CacheServer AND the Laravel will automatice replace this tag (with comment tags if that exists) to the stored html content.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

3668d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fcc234138346fa646ea0a5162f9de722aa584f0b23c97f282f61ce51a9befc0b?d=identicon)[esemve](/maintainers/esemve)

---

Tags

phplaravelcache

### Embed Badge

![Health badge](/badges/esemve-vanillacache/health.svg)

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

###  Alternatives

[awssat/laravel-visits

Laravel Redis visits counter for Eloquent models

975163.6k2](/packages/awssat-laravel-visits)[swayok/alternative-laravel-cache

Replacements for Laravel's redis and file cache stores that properly implement tagging idea. Powered by cache pool implementations provided by http://www.php-cache.com/

202541.1k6](/packages/swayok-alternative-laravel-cache)[antennaio/laravel-clyde

Image uploads and manipulation for Laravel, a wrapper around Glide

292.6k](/packages/antennaio-laravel-clyde)[eftec/cacheone

A Cache library with minimum dependency

103.5k4](/packages/eftec-cacheone)

PHPackages © 2026

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