Configure multiple Laravel cache drivers without accessing the server. It will update the config accordingly
faveo-helpdesk/laravel-cache is a Laravel package for configure multiple laravel cache drivers without accessing the server. it will update the config accordingly.
It currently has 1 GitHub stars and 183 downloads on Packagist (latest version v0.1.0).
Install it with composer require faveo-helpdesk/laravel-cache.
Discover more Laravel packages by faveo-helpdesk
or browse all Laravel packages to compare alternatives.
Last updated
This package allows you to choose cache driver from application without contacting server or any other files.
composer require faveo-helpdesk/laravel-cache
Publish the package
php artisan vendor:pubish --force --tag=advance-cache
How to update a cache driver ?
use CacheDriver\HandleCacheController;
$cache = new HandleCacheController();
// Store file driver
$cache->modify(['DEFAULT' => 'file']);
// Store database driver
$cache->modify(['DEFAULT' => 'database']);
// Store array driver
$cache->modify(['DEFAULT' => 'array']);
// Store redis driver
$cache->modify(['DEFAULT' => 'redis', 'CONNECTION_REDIS' => 'default']);
// Store memcached driver
$cache->modify(['DEFAULT' => 'memcached', 'MEMCACHED_HOST' => '', 'MEMCACHED_PORT' => '', 'MEMCACHED_PERSISTENT_ID' => '', 'MEMCACHED_USERNAME' => '', 'MEMCACHED_PASSWORD' => '']);
// Store dynamodb driver
$cache->modify(['DEFAULT' => 'dynamodb', 'AWS_ACCESS_KEY_ID' => '', 'AWS_SECRET_ACCESS_KEY' => '', 'AWS_DEFAULT_REGION' => '', 'DYNAMODB_CACHE_TABLE' => '', 'DYNAMODB_ENDPOINT' => '']);
How to get a speific Constant Value with Default value ?
use CacheDriver\HandleCacheController;
$cache = new HandleCacheController();
// Gets a default driver. If constant was not there, 'database' value will be picked. Not only DEFAULT constant but also serach all kind of cache Constant value
$cache::value('DEFAULT', 'database');
How to get a all values from speific driver ?
use CacheDriver\HandleCacheController;
$cache = new HandleCacheController();
// Passes a driver like file, database, array, redis, memcached and dynamodb
$cache::all('file');
The MIT License (MIT).