LaravelPackages.net
Acme Inc.
Toggle sidebar
morilog/infinity-cache

Infinity cache for Laravel Eloquent models and queries

15.752
31
v1.0.1
About morilog/infinity-cache

morilog/infinity-cache is a Laravel package for infinity cache for laravel eloquent models and queries. It currently has 31 GitHub stars and 15.752 downloads on Packagist (latest version v1.0.1). Install it with composer require morilog/infinity-cache. Discover more Laravel packages by morilog or browse all Laravel packages to compare alternatives.

Last updated

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
{
  ...
}

Star History Chart