lukaszaleckas / laravel-fallback-cache
Installs: 3 258
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 2
Open Issues: 4
Requires
- php: ^7.4|^8.0
- laravel/framework: ^8.0|^9.0|^10.0
Requires (Dev)
- mockery/mockery: ^1.5
- nunomaduro/larastan: ^1.0
- orchestra/testbench: ^6.24
- phpstan/phpstan-mockery: ^1.0
- phpunit/phpunit: ^9.5
- slevomat/coding-standard: ^6.4
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2024-12-05 08:08:53 UTC
README
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
- 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.
- Publish
fallback-cache.php
config file:
php artisan vendor:publish --tag=fallback-cache
That's it!