PHPackages                             neurony/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. [Database &amp; ORM](/categories/database)
4. /
5. neurony/laravel-query-cache

Abandoned → [varbox/varbox](/?search=varbox%2Fvarbox)Library[Database &amp; ORM](/categories/database)

neurony/laravel-query-cache
===========================

Cache all {select} queries or only the duplicate ones for a specific Eloquent model

3.0.0(5y ago)4924.6k—0%9[2 issues](https://github.com/Neurony/laravel-query-cache/issues)MITPHPPHP ^7.2.5

Since Mar 28Pushed 5y ago9 watchersCompare

[ Source](https://github.com/Neurony/laravel-query-cache)[ Packagist](https://packagist.org/packages/neurony/laravel-query-cache)[ RSS](/packages/neurony-laravel-query-cache/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (5)Versions (7)Used By (0)

Package discontinued! Check out VARBOX.IO instead.
==================================================

[](#package-discontinued-check-out-varboxio-instead)

Unfortunately this package is now discontinued.
Please check out [Varbox](https://varbox.io) (Laravel Admin Panel) for this functionality and much more.

- Buy:
- Docs:
- Demo:
- Repo

Thank you!

---

### Cache all "select" queries or only the duplicate ones for a specific Eloquent model

[](#cache-all-select-queries-or-only-the-duplicate-ones-for-a-specific-eloquent-model)

[![Build Status](https://camo.githubusercontent.com/2387fe8a477251ebdf707e1467a56c32fecf082d14aa4367ef731fd39ba85291/68747470733a2f2f7472617669732d63692e6f72672f4e6575726f6e792f6c61726176656c2d71756572792d63616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Neurony/laravel-query-cache)[![StyleCI](https://camo.githubusercontent.com/9b6a1e4f4f32d0e219a9f163cda5bbd3fda48b59ed12065adaa2667b2219b0ca/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3137373633363034312f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/177636041)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6f4fc8721517e8cb44859dcdd461b0d65421a74a2167ebcade609dd2d48bf188/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4e6575726f6e792f6c61726176656c2d71756572792d63616368652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Neurony/laravel-query-cache/?branch=master)

- [Overview](#overview)
- [Installation](#installation)
- [Usage](#usage)
- [Extra](#extra)

### Overview

[](#overview)

This package allows you to cache all queries of type `select`, or only just the duplicated ones for an Eloquent model.

> Please note that because cache tagging is used, "file" or "database" cache drivers are incompatible with this package.
>
> **Compatible cache stores:** array, redis, apc, memcached
> **Tested cache stores:** array, redis

### Installation

[](#installation)

Install the package via Composer:

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

```

Publish the config file with:

```
php artisan vendor:publish --provider="Neurony\QueryCache\ServiceProvider" --tag="config"

```

> Please read the `config/query-cache.php` config file comments as it contains extra information

### Usage

[](#usage)

##### Step 1

[](#step-1)

Your Eloquent models should use the `Neurony\QueryCache\Traits\IsCacheable` trait.

```
