topcu / dumber
Yet another dummy cache driver for laravel
2.0.4
2017-05-12 09:44 UTC
Requires
- illuminate/cache: 5.1.*|5.2.*|5.3.*|5.4.*
- illuminate/contracts: 5.1.*|5.2.*|5.3.*|5.4.*
- illuminate/support: 5.1.*|5.2.*|5.3.*|5.4.*
This package is not auto-updated.
Last update: 2025-02-01 18:26:04 UTC
README
Another Dummy Cache driver, which can log every call made to the driver if enabled by config.
Installation
Via Composer
$ composer require topcu/dumber
Add the service provider to the providers array in config/app.php
.
# ... 'providers' => array( # ... 'Topcu\Dumber\DumberServiceProvider', ), # ...
Usage
In your config/cache.php
change add a store using dumber as driver.
# ... 'stores' => [ # ... 'dumber' => [ 'driver' => 'dumber', ], # ...
And set your default store if needed.
'default' => 'dumber',
Enabling Logging
If you wish to enable logging, you need do publish package config file and set log_enabled
to true
php artisan vendor:publish --provider="Topcu\Dumber\DumberServiceProvider"
app/config/dumber.php
:
<?php return [ "log_enabled" => true, "log_level" => "notice" ];
You can also enable/disable logging on-the-fly with $cache->enableLog()
and $cache->disableLog()