cachify icon indicating copy to clipboard operation
cachify copied to clipboard

Improve error handling for Redis backend

Open stklcode opened this issue 11 months ago • 0 comments

Scenario to improve

Cachify 2.4.0 with Redis backend configured.

For whatever reason, connection to the configured Redis server fails. Could be misconfigurration or just a temporary connection problem.

Observed behavior

PHP Fatal error: Uncaught RedisException: ...

Desired behavior

In frontend the error should be logged, but it must not be passed to a user. Page should be rendered without caching.

In backend tasks, e.g. flushing the cache, the error should be caught and transformed into an admin notice instead of the PHP process crashing

Additional context

Cross Reference: https://wordpress.org/support/topic/php-fatal-error-457

stklcode avatar Feb 01 '25 09:02 stklcode