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

Flushing Redis cache should not redirect to Redis settings #459

Closed MatzeKitt closed 1 year ago

MatzeKitt commented 1 year ago

Currently, if you flush the cache in the admin bar from whatever page, you will be redirected to the settings page of the Redis cache. At least on multisites. I think this is a bad user experience, since there is no indication that you will be redirected to said page nor can it be argued as intended, since there is a dedicated settings link below.

tillkruss commented 1 year ago

@MatzeKitt: It is not great. If we'd essentially reload the current page, then how/where would you display the "cache was flushed" message?

MatzeKitt commented 1 year ago

Maybe replace the link with an Ajax functionality and then use JavaScript to properly display this information.

tillkruss commented 1 year ago

AJAX and then the user reloads manually, or AJAX + auto reload and display a message?

MatzeKitt commented 1 year ago

If you clear the cache via Ajax, there is no need to reload the page. Just flush, reset the statistics in the admin bar and display a message.

tillkruss commented 1 year ago

Sounds like a good idea. It's pretty low on my priority list. Do you want to open a PR for this?

MatzeKitt commented 1 year ago

Unfortunately, Iโ€™m currently unable to do that. And itโ€™s also pretty low on my priority list. It was just something I quickly noticed that can be improved. ๐Ÿ™‚

tillkruss commented 1 year ago

We'll keep this open ๐Ÿ‘

tillkruss commented 1 year ago

See #466.