Replies: 1 comment 1 reply
-
|
We always handle Cache as if it can throw and we call the callback. Cache not being documented that it can throw (analog for query builder) did not stop us to prepare for the worst. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Gracefully Failing Cache Store
Problem Statement
Imagine a scenario where a Laravel app uses the Redis cache driver. Currently, if Redis becomes unavailable (network issue, server down, etc.), all cache operations throw exceptions and crash the
application.
This is problematic because:
Proposed Solution
Add a graceful_failure configuration option that allows cache stores to fail gracefully while still logging errors.
Configuration
Behavior
When graceful_failure is enabled and Redis is unavailable:
I know that there are some bad use cases like:
what are you thoughts about something like that?
Beta Was this translation helpful? Give feedback.
All reactions