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

ActiveLibrary[Caching](/categories/caching)

anorgan/laravel-cache
=====================

Laravel Cache package that supports tagging

v0.10.1(8y ago)316MITPHPPHP ^7.0

Since Mar 19Pushed 8y ago1 watchersCompare

[ Source](https://github.com/anorgan/laravel-cache)[ Packagist](https://packagist.org/packages/anorgan/laravel-cache)[ RSS](/packages/anorgan-laravel-cache/feed)WikiDiscussions master Synced yesterday

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

Cache models by tagging
=======================

[](#cache-models-by-tagging)

[![Latest Version](https://camo.githubusercontent.com/b6f1e1954b8dc48524154bb4286142a9527286b360a66c85149611384a056eeb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f616e6f7267616e2f6c61726176656c2d63616368652e7376673f7374796c653d666c61742d737175617265)](https://github.com/anorgan/laravel-cache/releases)[![Quality Score](https://camo.githubusercontent.com/336a8f5932237d27f6f2338c24fad0e195d1ce3b402e85eac194e443845d5cb4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f616e6f7267616e2f6c61726176656c2d63616368652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/anorgan/laravel-cache/?branch=master)[![Build Status](https://camo.githubusercontent.com/9f937cc31f2b44390ca5a66e447ec710ae1c9a6f4e4a86be9b220e03f532a344/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f616e6f7267616e2f6c61726176656c2d63616368652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/anorgan/laravel-cache)[![GitHub license](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](https://raw.githubusercontent.com/anorgan/laravel-cache/master/LICENSE)

This package aims to help with caching of models by tagging them and invalidating caches on model change.

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

[](#installation)

Install this package via composer by running:

```
composer require anorgan/laravel-cache:^1.0
```

Add to providers:

```
// config/app.php
'providers' => [
    ...
    Anorgan\LaravelCache\LaravelCacheServiceProvider::class
];
```

To publish the config, run:

```
php artisan vendor:publish --provider="Anorgan\LaravelCache\LaravelCacheServiceProvider" --tag="config"
```

Config looks like this:

```
