jooorooo / cache by jooorooo

Cache for laravel 5
41
1
2
Package Data
Maintainer Username: jooorooo
Maintainer Contact: jooorooo@gmail.com (Georgi Nachev)
Package Create Date: 2016-02-10
Package Last Update: 2016-02-21
Language: PHP
License: MIT
Last Refreshed: 2024-11-15 15:07:50
Package Statistics
Total Downloads: 41
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

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}