Skip to content
@mr-cache

mr-cache

MrCache

Redis caching, close to your Eloquent queries.

Build with Laravel. Keep cache behavior explicit.

Get started · Explore the code · العربية · Packagist


MrCache is an open-source Redis query-caching library for Laravel and Eloquent. Add caching to your models, choose a lifetime for each query, and keep a direct database path when you need it.

use Illuminate\Database\Eloquent\Model;
use MrCache\Traits\CacheableModel;

class Post extends Model
{
    use CacheableModel;
}

$posts = Post::where('is_published', true)->withCustomTTL(60)->get();
$fresh = Post::withoutCaching()->find(1);

Fits Eloquent

Work with your models and familiar query chains.

Keeps control visible

Choose query lifetimes and bypass caching explicitly.

Puts correctness first

Understand invalidation and consistency before relying on cached results.

Start building

composer require mrcache/mrcache

Follow the installation and configuration guide before enabling caching. Compatibility, supported queries and consistency guarantees depend on the package version—check the package repository and tags for the version you use.

Build with us

We welcome reproducible bug reports, regression tests, practical examples, documentation improvements and measured performance work.

Report a bug or ask a question · Explore contributions · Read the license


بالعربية

MrCache مكتبة مفتوحة المصدر لتخزين استعلامات Laravel وEloquent مؤقتاً باستخدام Redis.

استخدم نماذجك واستعلاماتك المعتادة، وحدّد مدة التخزين لكل استعلام، وتجاوز الكاش عندما تحتاج قراءة مباشرة من قاعدة البيانات. راجع سلوك الإصدار الذي تستخدمه وحدود الإبطال والاتساق قبل التفعيل.

ابدأ من الدليل العربي · المستودع الرئيسي · الأسئلة والمشكلات

Popular repositories Loading

  1. mr-cache mr-cache Public

    Redis query caching for Laravel and Eloquent — explicit TTLs, cache policies, and transaction-aware invalidation.

    PHP 6

  2. .github .github Public

    MrCache — Intelligent Redis-powered query caching for Laravel Eloquent, engineered for performance, consistency, and production reliability.

Repositories

Showing 2 of 2 repositories

Top languages

Loading…

Most used topics

Loading…