PHPackages                             davidmpeace/squirrel - 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. davidmpeace/squirrel

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

davidmpeace/squirrel
====================

Laravel package that automatically caches and retrieves models when querying records using Eloquent ORM

0.6.2(7y ago)72.6k1MITPHPPHP &gt;=5.4.0

Since Mar 21Pushed 7y ago1 watchersCompare

[ Source](https://github.com/davidmpeace/squirrel)[ Packagist](https://packagist.org/packages/davidmpeace/squirrel)[ RSS](/packages/davidmpeace-squirrel/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (4)Versions (14)Used By (0)

Squirrel
========

[](#squirrel)

Squirrel is an Eloquent cacheing solution that handles the complexities of 'remembers' and 'forgets' for you. This package is intended to be used with Laravel. Squirrel automatically caches and retrieves models when querying records using [Eloquent ORM](http://laravel.com/docs/eloquent). When Squirrel is used, you can expect to see orders of magnitude fewer queries to your database, with the confidence you will never be retrieving stale data from Cache.

License
-------

[](#license)

Squirrel is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

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

[](#installation)

To get started with Squirrel, add to your `composer.json` file as a dependency:

```
composer require davidmpeace/squirrel

```

### Basic Usage

[](#basic-usage)

To use the Squirrel library, you simply need to use the Squirrel trait for any model you want to implement cacheing for. Typically, you would want to implement the trait in your super-class so that all your sub-classes will automatically inherit the functionality.

```
