PHPackages                             d076/laravel-cache-helper - 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. d076/laravel-cache-helper

ActiveLibrary[Caching](/categories/caching)

d076/laravel-cache-helper
=========================

Small helper for Laravel Cache facade

v1.0.0(2y ago)06MITPHPPHP ^8.2

Since Nov 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/D076/laravel-cache-helper)[ Packagist](https://packagist.org/packages/d076/laravel-cache-helper)[ RSS](/packages/d076-laravel-cache-helper/feed)WikiDiscussions main Synced 2d ago

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

laravel-cache-helper
====================

[](#laravel-cache-helper)

 [![Laravel v10.x](https://camo.githubusercontent.com/bfea501efe5759f52cfebee79ebb907199c9e88ae0bd65948d40ba67a1ad73fa/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d7631302e782d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c)](https://laravel.com) [![PHP 8.2](https://camo.githubusercontent.com/95275f89c84292d44179906cd7fecba6795cc62414fc389bb3031205fe046478/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870)](https://php.net)

Small helper for Laravel Cache facade

Quick Setup
-----------

[](#quick-setup)

```
composer require d076/laravel-cache-helper
```

Usage
-----

[](#usage)

Add HasCached trait to your class which methods you want to cache.

```
use D076\LaravelCacheHelper\Traits\HasCached;

class SomeClass
{
    use HasCached;

    public function someMethod($params)
    {
        ...
    }

    public static function someStaticMethod($params)
    {
        ...
    }
}
```

### Important

[](#important)

Your class or parent classes/traits should not contain override \_\_call and \_\_callStatic methods. So you can`t use HasCached trait in your Models.

Now you can call your methods with Cached or ForceCached prefix.

Optionally, you can pass last parameter $ttl in seconds.

```
$someClass->someMethodCached($params, $ttl);
$someClass->someMethodForceCached($params, $ttl);

SomeClass::someStaticMethodCached($params, $ttl);
SomeClass::someStaticMethodForceCached($params, $ttl);
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Unknown

Total

1

Last Release

971d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelphp

### Embed Badge

![Health badge](/badges/d076-laravel-cache-helper/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M195](/packages/laravel-ai)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[illuminate/cache

The Illuminate Cache package.

12937.0M1.8k](/packages/illuminate-cache)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k91.9k1](/packages/mike-bronner-laravel-model-caching)

PHPackages © 2026

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