{"repo":"mike-bronner/laravel-model-caching","free":true,"listed":false,"github":"https://github.com/mike-bronner/laravel-model-caching","clone":"git clone https://github.com/mike-bronner/laravel-model-caching.git","description":"Eloquent model-caching made easy.","language":"PHP","stars":2371,"topics":["laravel","caching","models","package"],"license":"MIT","category":"databases-storage","readme_excerpt":"🚀 Model Caching for Laravel 🗂️ Table of Contents - 📖 Summary - 📦 Installation - 🚀 Getting Started - ⚙️ Configuration - 🤝 Contributing - ⬆️ Upgrading - 🔐 Security - 📚 Further Reading 📖 Summary Automatic, self-invalidating Eloquent model and relationship caching. Add a trait to your models and all query results are cached automatically — no manual cache keys, no forgetting to invalidate. When a model is created, updated, or deleted the relevant cache entries are flushed for you. ⚡ Typical performance improvements range from 100–900% reduction in database queries on read-heavy pages. 🧪 Backed by 335+ integration tests across PHP 8.2–8.5 and Laravel 11–13. Use this package when your application makes many repeated Eloquent queries and you want a drop-in caching layer that stays in sync with your data without any manual bookkeeping. 🔄 Before & After ❌ Without this package — manual cache keys, manual invalidation: ✅ With this package — add the trait, query normally: ✅ What Gets Cached - Model queries ( get , first , find , all , paginate , pluck , value , exists ) - Aggregations ( count , sum , avg , min , max ) - Eager-loaded relationships (via with() ) 🚫 What Does Not Get Cached - Lazy-loaded relationships — only eager-loaded ( with() ) relationships are cached. Use with() to benefit from caching. - Queries using select() clauses — custom column selections bypass the cache. - Queries inside transactions — cache is not automatically flushed when a transaction commits; ","default_branch":null,"files":null,"tree":[],"storefront":"/r/mike-bronner","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mike-bronner/laravel-model-caching/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}