PHPackages                             vsmov/laravel-caching-model - 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. vsmov/laravel-caching-model

ActiveLibrary[Caching](/categories/caching)

vsmov/laravel-caching-model
===========================

A simple cache library for laravel eloquent model

1.0.0(1mo ago)110↓100%2MITPHPPHP ^7.0|^8.0

Since Apr 15Pushed 1mo agoCompare

[ Source](https://github.com/vsphim/laravel-caching-model-main)[ Packagist](https://packagist.org/packages/vsmov/laravel-caching-model)[ RSS](/packages/vsmov-laravel-caching-model/feed)WikiDiscussions main Synced 1w ago

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

\# laravel-caching-model - Simple package for caching laravel eloquent model - Support retrieve model stored in cache store by id (or other primary key) # Usage 1. Implement Cacheable interface then use HasCache trait: ```php use Vsmov\\CachingModel\\Contracts\\Cacheable; use Vsmov\\CachingModel\\HasCache; class Setting extends Model implements Cacheable { use HasCache; ... } ``` 2. use `fromCache()` static method to retrieve model data from cache storage ```php $cachedInstance = Setting::fromCache()-&gt;find($key); ``` # Available methods: 1. public static function primaryCacheKey(): string; - Return primary key for creating cache key - Default: id 2. public static function getCacheKey($id): string; - Return cache key for specific instance with primary key is $id 3. public static function cacheTimeout(): int; - Return cache timeout 4. public function scopeCacheWithRelation($query); - Specific relationship will cache together model ```php public function scopeCacheWithRelation($query) { return $query-&gt;with('relationship:id); } ```# laravel-caching-model-main

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance89

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

56d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/217009717?v=4)[vsphim](/maintainers/vsphim)[@vsphim](https://github.com/vsphim)

---

Top Contributors

[![vsphim](https://avatars.githubusercontent.com/u/217009717?v=4)](https://github.com/vsphim "vsphim (2 commits)")

### Embed Badge

![Health badge](/badges/vsmov-laravel-caching-model/health.svg)

```
[![Health](https://phpackages.com/badges/vsmov-laravel-caching-model/health.svg)](https://phpackages.com/packages/vsmov-laravel-caching-model)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135212.4k7](/packages/statamic-rad-pack-runway)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21313.7k3](/packages/ecotone-laravel)[laravel-enso/rememberable

Model caching dependency for Laravel Enso

2864.4k40](/packages/laravel-enso-rememberable)[justbetter/laravel-unique-values

Package to generate unique values with support for concurrency utilizing cache locking

535.6k](/packages/justbetter-laravel-unique-values)

PHPackages © 2026

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