Laravel Model Caching

PHP MIT

High-performance Eloquent model caching for Laravel with automatic cache invalidation, relationship-aware caching, query caching, cache tags, and Redis support.

Stars
22
Forks
3
Downloads
2,346
Open Issues
0
Files main

Repository Files

Loading file structure...
tests/Fixtures/Post.php
<?php

namespace GhostCompiler\LaravelModelCaching\Tests\Fixtures;

use GhostCompiler\LaravelModelCaching\Concerns\HasModelCaching;
use Illuminate\Database\Eloquent\Model;

class Post extends Model
{
    use HasModelCaching;

    protected $table = 'posts';

    public function comments()
    {
        return $this->hasMany(Comment::class);
    }
}