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 today

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 21% 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

1528d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13597665?v=4)[insomnicles](/maintainers/insomnicles)[@insomnicles](https://github.com/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.8k54.9M11.6k](/packages/illuminate-database)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[lemaur/eloquent-publishing

218.1k1](/packages/lemaur-eloquent-publishing)

PHPackages © 2026

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