PHPackages                             pulkitjalan/cacheable - 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. pulkitjalan/cacheable

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

pulkitjalan/cacheable
=====================

Automatically cache Eloquent models using the find methods

0.2.0(10y ago)916.2k4MITPHPPHP &gt;=5.5.9

Since Sep 23Pushed 10y ago2 watchersCompare

[ Source](https://github.com/pulkitjalan/cacheable)[ Packagist](https://packagist.org/packages/pulkitjalan/cacheable)[ Docs](https://github.com/pulkitjalan/cacheable)[ RSS](/packages/pulkitjalan-cacheable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Cacheable
=========

[](#cacheable)

> Automatically cache basic Eloquent models using the `find` methods

[![License](https://camo.githubusercontent.com/30597ff9a350144f03bffdd9183e16468e0b3ca1193e1d08591d992622738d55/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](http://www.opensource.org/licenses/MIT)[![Latest Version](https://camo.githubusercontent.com/989321f3a300247ff4a7950a513f6a6c71a7e533d7b7f1c05169aac66528ca6c/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70756c6b69746a616c616e2f636163686561626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pulkitjalan/cacheable)[![Total Downloads](https://camo.githubusercontent.com/c1458813666e3046c1e00a6f13905a2a6fe3e01a6c680b36e6090810f452c96d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70756c6b69746a616c616e2f636163686561626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pulkitjalan/cacheable)

Requirements
------------

[](#requirements)

- PHP &gt;= 5.5.9
- Laravel &gt;= 5.1

Installation
------------

[](#installation)

Install via [composer](https://getcomposer.org/) - In the terminal

```
composer require pulkitjalan/cacheable

```

This package makes use of [pulkitjalan\\multicache](https://github.com/pulkitjalan/multicache) which requires a service provider to be registered. So add the following to the `providers` array in your `config/app.php`

```
PulkitJalan\Cache\Providers\MultiCacheServiceProvider::class
```

Usage
-----

[](#usage)

Simply use the `Cacheable` trait in any model you want to be cache automatically.

```
