PHPackages                             sgtaziz/infinity-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. sgtaziz/infinity-cache

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

sgtaziz/infinity-cache
======================

Infinity cache for Laravel Eloquent models and queries

v1.0.1(10y ago)07MITPHP

Since Sep 18Pushed 3y agoCompare

[ Source](https://github.com/sgtaziz/InfinityCache)[ Packagist](https://packagist.org/packages/sgtaziz/infinity-cache)[ RSS](/packages/sgtaziz-infinity-cache/feed)WikiDiscussions master Synced 2d ago

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

InfinityCache
=============

[](#infinitycache)

A Laravel package for Eloquent cache. InfinityCache provides infinity and forever cache for queries results until the model changes. If a model has been created, deleted or updated, model queries caches will be flushed.

### Requirements

[](#requirements)

This package works only with ***taggable cache storages*** and drivers such as `memcached` or `Redis` and other storages that extended from `Illuminate\Cache\TaggedCache`.

### Installation

[](#installation)

To install this package run this composer command:

```
composer require morilog/infinity-cache
```

Add the ServiceProvider to your `config/app.php` providers array:

```
    'providers' => [
        ...
        Morilog\InfinityCache\InfinityCacheServiceProvider::class,
        ...
    ]
```

Then publish the config file:

```
php artisan vendor:publish --provider="Morilog\InfinityCache\InfinityCacheServiceProvider" --tag="config"
```

### Usage

[](#usage)

For using InfinityCache, your eloquent model must extend `Morilog\InfinityCache\Model`

example:

```
