PHPackages                             mtgofa/laravel-query-cache - 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. mtgofa/laravel-query-cache

ActiveLibrary[Caching](/categories/caching)

mtgofa/laravel-query-cache
==========================

Laravel database cache package and missing relationship events.

v1.0.3(3y ago)099MITPHPPHP ^7.2|^8.0

Since Oct 3Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mtgofa/laravel-query-cache)[ Packagist](https://packagist.org/packages/mtgofa/laravel-query-cache)[ RSS](/packages/mtgofa-laravel-query-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (5)Used By (0)

Introduction
============

[](#introduction)

This package based on 2 packages

```
- whthT/perfectly-cache

- chelout/laravel-relationship-events

```

It's a merge between cache package and relationships events to clear cache if change happened throw relationship.

Special Thanks

PerfectlyCache
==============

[](#perfectlycache)

Laravel eloquent query cache package.

It serves to cache and use any queries you make without having to make any changes to the database, system, or queries.

PerfectlyCache automatically redirects the same query to the model when you need the same query by caching the results of the queries you make over the model.

### Installing

[](#installing)

- Composer Execute the following command to get the latest version of the package:

```
composer require mtgofa/laravel-query-cache

```

- Publish Configuration

```
php artisan vendor:publish --provider="MTGofa\QueryCache\Providers\QueryCacheServiceProvider"

```

- Use trait on your models
    add this code in your models / or add just your base model like this

```
