Skip to content

Improve error handling for Redis backend #316

@stklcode

Description

@stklcode

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions