Skip to content

hubble459/laravel-fallback-cache

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Fallback Cache

This simple package aims to handle cache store downtimes.

Let's say your default cache driver is redis and you experience it's downtime. Your whole app would be down because of that.

This package tries retrieving a value from cache store and if exception is thrown, switches cache driver / store to a one specified in config.

Installation

  1. Run:
composer require lukaszaleckas/laravel-fallback-cache

This package does not automatically register service provider, since you might be using cache in other providers. So you need to register it in your application's app.php:

LaravelFallbackCache\FallbackCacheServiceProvider::class

Note: if you are using cache in other providers, register this one before them.

  1. Publish fallback-cache.php config file:
    php artisan vendor:publish --tag=fallback-cache

That's it!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 92.8%
  • Makefile 7.2%