redis object cache plugin and rank math conflict

When I use the RankMeth plugin and the Redis object cache plugin, the WordPress frontend becomes very slow and I get this error in flush log:

RankMath\WooCommerce\Permalink_Watcher->add_rewrite_rules, apply_filters('rewrite_rules_array'), WP_Rewrite->rewrite_rules, WP_Rewrite->wp_rewrite_rules, WP_Rewrite->flush_rules


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer