PHPackages                             insomnicles/laracache - 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. [Database &amp; ORM](/categories/database)
4. /
5. insomnicles/laracache

ActiveLibrary[Database &amp; ORM](/categories/database)

insomnicles/laracache
=====================

A trait for caching Laravel models

v0.0.9(4y ago)015MITPHP

Since Apr 10Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (12)Used By (0)

Laracache
=========

[](#laracache)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3ab31e93ae65429e7e6864bf8f575914d564660bd7626297077f2cf2f098d018/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e736f6d6e69636c65732f6c61726163616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/insomnicles/laracache)[![Total Downloads](https://camo.githubusercontent.com/197ce8d3094d99c7373d8e3f8737ac37dbb314042f5dade872754c4a290f3e16/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e736f6d6e69636c65732f6c61726163616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/insomnicles/laracache)[![StyleCIBanner](https://camo.githubusercontent.com/b61bbb7dd7574830c8b4199b3a055a2b3f7f53699cd9b9a91624c0bbd1971580/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3437333732373836382f736869656c64)](https://camo.githubusercontent.com/b61bbb7dd7574830c8b4199b3a055a2b3f7f53699cd9b9a91624c0bbd1971580/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3437333732373836382f736869656c64)

A trait for accessing Laravel Eloquent models directly from Cache

Source code packagist.

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

[](#installation)

Via Composer

```
$ composer require insomnicles/laracache
```

Usage
-----

[](#usage)

Make sure your app is connected to a Cache: memcache, redis, etc.

- If you're using Sail in Laravel 8+, this is setup out of the box

Add the Cachable Trait to your Model; for example, for the User Model

```
	use Insomnicles\Laracache\Cachable.php

	class User {
		use Cachable;

	}

```

Use the Cached Model via Eloquent-like methods

```
	User::refreshCache();
	User::allInCache();

```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.1% 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 ~1 days

Total

10

Last Release

1473d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/33817780aaaafb49d1fbf731fb22019f92ef4d8b7a97889d8993e28893d4f8ce?d=identicon)[insomnicles](/maintainers/insomnicles)

---

Top Contributors

[![insomnicles](https://avatars.githubusercontent.com/u/13597665?v=4)](https://github.com/insomnicles "insomnicles (34 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (9 commits)")

---

Tags

eloquentlaravelphplaravelLaracache

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/insomnicles-laracache/health.svg)

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

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

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

423715.4k1](/packages/clickbar-laravel-magellan)

PHPackages © 2026

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