Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hootlex/query-cache

Easily Cache Eloquent Collections
https://github.com/hootlex/query-cache

Last synced: 3 days ago
JSON representation

Easily Cache Eloquent Collections

Awesome Lists containing this project

README

        

> **IMPORTANT NOTICE: This package is not maintained and maybe not working at all. Use it at your own risk!!**

# Laravel 5 query cache

This Laravel 5 package allows you to easily cache eloquent queries by implementing laravel 4 remember method.

##How to use
###Step 1: Install Through Composer
```
composer require kyrenator/query-cache
```
###Step 2: Use QueryCache In Your Model
```php
take(3)->get();

//use cache tags
\App\Post::remember()->cacheTags('posts', 'fresh')->take(3)->get();
```

##More Features
###Global Cache
If you want you can cache all queries for a specific model by siply defining cacheAll var inside your model.
QueryCache will aply remember method to all model queries.
```php