simexis/cache

Cache for laravel 5
42 1
Install
composer require simexis/cache
License:MIT
Last Updated:Feb 21, 2016
Links: GitHub  ·  Packagist
Maintainer: jooorooo

Laravel 5 replace default cache

In "config/app.php" replace

  • Illuminate\Cache\CacheServiceProvider::class,

with

  • Simexis\Cache\CacheServiceProvider::class,

Usage

//set cache
\Cache::set('category.list', $categories);

//get cache
$categories = \Cache::get('category.list');

//delete cache
\Cache::forget('category.list');
//or 
\Cache::forget('category.*'); // delete all cache where key is category.{somename}