New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

morilog/infinity-cache

Infinity cache for Laravel Eloquent models and queries
15,752 31
Install
composer require morilog/infinity-cache
Latest Version:v1.0.1
Laravel:5
License:MIT
Last Updated:Feb 21, 2016
Links: GitHub  ·  Packagist
Maintainer: morilog

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:

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

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

example:

<?php
namespace App\Models;

use Morilog\InfinityCache\Model as InfinityCacheModel;

class Post extends InfinityCacheModel
{
  ...
}

Related Packages

morilog/flexible-repository

Flexible and powerful repositories for laravel framework

2,415 4
alex433/laravel-eloquent-cache

Laravel's Eloquent models caching

3,465 2
giver/cacheable

Query caching for Laravel 5

294 3
prettus/l5-repository

Laravel 8|9|10|11|12|13 - Repositories to the database layer

12,289,794 4,194
m2quared/eloquent-depot

Repositories to the database layer

20,083 1

Version History

Version Released Laravel License
v1.0.1 ^5.1 MIT
v1.0 ^5.1 MIT
v0.1.1-p1 ^5.1 MIT
v0.1.1 ^5.1 MIT
v0.1 ^5.1 MIT