Foxws

Eloquent · Model Caching · Per-user Isolation

Laravel Modelcache

Attach cached values to Eloquent models, with each user's data kept in its own namespace.

composer require foxws/laravel-modelcache
Get startedSource
Latest release
1.5.0
Requires
PHP ^8.2
Laravel
12.x / 13.x
Licence
MIT
Downloads
1.8K/mo

Introduction

Laravel Model Cache lets you attach cached values to Eloquent models — either to one record or to the whole class — using any Laravel cache driver. Each logged-in user gets their own cache namespace by default, so two users never see each other's cached value for the same model.

Let your AI agent do the hard parts. This package ships a Laravel Boost skill, modelcache-development, that teaches your agent how to install, configure and use Laravel Model Cache. Install Boost and select the skill when prompted:

composer require laravel/boost --dev
php artisan boost:install

Already using Boost? Run php artisan boost:update --discover to pick up the skill. Then just ask, for example: "Remember each user's playback position on my Video model."

Continue to Installation to get started.