Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/hootlex/query-cache
- Owner: hootlex
- Created: 2015-03-27T03:48:45.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-22T02:07:24.000Z (over 6 years ago)
- Last Synced: 2024-05-02T10:21:36.176Z (7 months ago)
- Language: PHP
- Size: 164 KB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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