A laravel package that allows using two caching engines, one as a fallback for the other
Add the following to your composer.json file's require section:
Run composer update. Composer should install the latest version of the package.
Now, register the Service Provider in app/config/app.php file. Add the following line to the providers array:
You should next register an alias for the API. We recommend MCache. Add the following line to the aliases array in the same file:
'MCache' => 'Masnun\Cache\CacheFacade',
Let's publish the configuration values for the package. Execute from the command line:
php artisan config:publish masnun/cache
The configuration file will be published to app/config/packages/masnun/cache/cache.php. Please feel free to tweak the values. Here's a short description:
(PS: The async data offloading still not implemented, it's work in progress).
Route::get('/', function ()
MCache::put('name', 'masnun', 60);
Please feel free to be creative and try the usual Cache APIs. Here's a list of currently implemented methods: