jooorooo / cache by jooorooo

Cache for laravel 5
40
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-04-18 15:11:29
Package Statistics
Total Downloads: 40
Monthly Downloads: 0
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}