https://github.com/morilog/infinitycache
Infinity cache for Laravel Eloquent models and queries
https://github.com/morilog/infinitycache
Last synced: about 2 months ago
JSON representation
Infinity cache for Laravel Eloquent models and queries
- Host: GitHub
- URL: https://github.com/morilog/infinitycache
- Owner: morilog
- License: mit
- Created: 2015-09-18T16:28:22.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-21T13:04:28.000Z (over 9 years ago)
- Last Synced: 2025-03-14T02:32:39.316Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 12.7 KB
- Stars: 31
- Watchers: 4
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
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
To install this package run this composer command:
~~~ bash
composer require morilog/infinity-cache
~~~Add the ServiceProvider to your `config/app.php` providers array:
~~~ php
'providers' => [
...
Morilog\InfinityCache\InfinityCacheServiceProvider::class,
...
]
~~~Then publish the config file:
~~~ php
php artisan vendor:publish --provider="Morilog\InfinityCache\InfinityCacheServiceProvider" --tag="config"
~~~### Usage
For using InfinityCache, your eloquent model must extend `Morilog\InfinityCache\Model`example:
~~~ php