rhubarbgroup / redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.
https://wordpress.org/plugins/redis-cache/
GNU General Public License v3.0
427 stars 149 forks source link

Prevent first time critical errors #464

Closed A5hleyRich closed 1 year ago

A5hleyRich commented 1 year ago

Resolves #458

tillkruss commented 1 year ago

Should we include the custom error message when connections fail in this PR as well?

A5hleyRich commented 1 year ago

@tillkruss are you referring to db-error.php?

tillkruss commented 1 year ago

Yes. Really what I mean is displaying a nice message when a connection error occurs.

A5hleyRich commented 1 year ago

@tillkruss this is what's shown when WP_REDIS_GRACEFUL is false. Links to: https://github.com/rhubarbgroup/redis-cache/blob/develop/INSTALL.md

If a db-error.php file exists, that is shown instead. I wasn't sure if we'd want our own file, but db-error.php is more well known so gone with that for now.

CleanShot 2023-05-02 at 13 45 54@2x
A5hleyRich commented 1 year ago

@tillkruss this is ready for review. Video of the changes:

https://user-images.githubusercontent.com/1422996/236030643-c318bf81-ac2c-4e80-a3fc-d18fea112777.mp4

tillkruss commented 1 year ago

Fucking amazing.