PHPackages                             jangaraev/laravel-blade-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. [Templating &amp; Views](/categories/templating)
4. /
5. jangaraev/laravel-blade-cache

ActiveLibrary[Templating &amp; Views](/categories/templating)

jangaraev/laravel-blade-cache
=============================

Handy package to cache blade files

1.0.3(1y ago)3708↓44.4%[1 issues](https://github.com/jangaraev/laravel-blade-cache/issues)PHPPHP &gt;=8.0

Since Jun 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jangaraev/laravel-blade-cache)[ Packagist](https://packagist.org/packages/jangaraev/laravel-blade-cache)[ Docs](https://github.com/jangaraev/laravel-blade-cache)[ RSS](/packages/jangaraev-laravel-blade-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (6)Used By (0)

laravel-blade-cache
===================

[](#laravel-blade-cache)

A small package to cache blade views. It caches the whole contents of rendered blade file as a regular cache item and then just outputs it from cache during next requests.

It gives a significant speed &amp; memory usage improvement in case if a large dataset is to be processed in blade files, typically a large Eloquent collection with lots of relationships loaded.

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

[](#installation)

```
$ composer require jangaraev/laravel-blade-cache
```

Usage
-----

[](#usage)

In Blade files call the `@cache` view helper where needed.

Arguments:

1. `$view` - view name
2. `$ttl` - cache ttl, optional, default is one hour (`60`)

```
// before
@include('homepage.categories')

// after
@cache('homepage.categories', 30)
```

Then you should use a view composer to pass the data to view:

For example, in your `AppServiceProvider`:

```
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    // ...

    public function boot()
    {
        View::composer('homepage.categories', function (\Illuminate\View\View $view) {
            $view->with('records', \App\Repositories\Foo::get());
        });

        View::composer('components.listings', function (\Illuminate\View\View $view) {
            $view->with([
                'block_title' => __('titles.new'),
                'listings' => \App\Models\FooBar::getRecent(),
                'seeMore' => route('listings.latest')
            ]);
        });
}
```

License
-------

[](#license)

Package is an open-sourced laravel package licensed under the MIT license.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Total

5

Last Release

594d ago

Major Versions

v0.9 → v1.02022-07-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/5156b25a4e9f1af8e56beccc120425bc12c36e8ef5ec77d0032022b565aed256?d=identicon)[jangaraev](/maintainers/jangaraev)

---

Top Contributors

[![jangaraev](https://avatars.githubusercontent.com/u/101257372?v=4)](https://github.com/jangaraev "jangaraev (5 commits)")

---

Tags

phplaravelbladecacheviews

### Embed Badge

![Health badge](/badges/jangaraev-laravel-blade-cache/health.svg)

```
[![Health](https://phpackages.com/badges/jangaraev-laravel-blade-cache/health.svg)](https://phpackages.com/packages/jangaraev-laravel-blade-cache)
```

PHPackages © 2026

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