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

ActiveLibrary

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 1mo 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 32% 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

916d 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

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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