PHPackages                             devituz/laravel-cachable - 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. devituz/laravel-cachable

ActiveLibrary[Caching](/categories/caching)

devituz/laravel-cachable
========================

Simple and dynamic caching trait for Laravel models (Redis compatible)

v1.2.6(6mo ago)026MITPHPPHP ^8.0

Since Oct 17Pushed 6mo agoCompare

[ Source](https://github.com/devituz/laravel-cachable)[ Packagist](https://packagist.org/packages/devituz/laravel-cachable)[ RSS](/packages/devituz-laravel-cachable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (18)Used By (0)

🚀 Laravel Cachable
==================

[](#-laravel-cachable)

**LaravelCachable** is a simplified, multi-language **model caching** trait that works with **Redis**. It automatically caches and purges model data on `created`, `updated`, and `deleted` events.

---

📦 Installation
--------------

[](#-installation)

```
composer require devituz/laravel-cachable
```

#### Add model

[](#add-model)

```
use Cachable;
```

#### Example code

[](#example-code)

```
$product = Product::find(1);

// 🔹 Save single record to cache
$product->cacheSingle();

// 🔹 Retrieve single record from cache
$cached = Product::getCached(1);

// 🔹 Retrieve all records from cache
$all = Product::allCached();

// 🔹 Clear cache for a record
$product->forgetCache();

```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance66

Regular maintenance activity

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

17

Last Release

206d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f24fe591b3c2a9ddd2365d352efce593b0582a8dd5584e505e643546f2b8cd2?d=identicon)[devituz](/maintainers/devituz)

---

Tags

laravelmodeltraitrediscachedevituz

### Embed Badge

![Health badge](/badges/devituz-laravel-cachable/health.svg)

```
[![Health](https://phpackages.com/badges/devituz-laravel-cachable/health.svg)](https://phpackages.com/packages/devituz-laravel-cachable)
```

###  Alternatives

[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[awssat/laravel-visits

Laravel Redis visits counter for Eloquent models

975163.6k2](/packages/awssat-laravel-visits)[vink/nova-cache-card

Manage your application's cache from a handy Laravel Nova dashboard card.

26317.3k1](/packages/vink-nova-cache-card)[dragon-code/laravel-cache

An improved interface for working with cache

6844.8k10](/packages/dragon-code-laravel-cache)[nexxai/laravel-cfcache

A handful of Cloudflare cache helpers for Laravel

1317.7k](/packages/nexxai-laravel-cfcache)[byerikas/cache-tags

Allows for Redis/Valkey cache flushing multiple tagged items by a single tag.

1413.9k](/packages/byerikas-cache-tags)

PHPackages © 2026

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