When I turn on the Remove category base option from General Settings > WooCommerce, the site’s object cache crashes and flushes cache every second. On one of my sites, I use the object cache feature of the Lightspeed Cache plugin and on my other site, I use the Redis plugin to benefit from the object cache feature, and on both of my sites, when I turn on the Remove category base option from the General Settings > WooCommerce section, my site It becomes very slow and the site’s object cache is flushed every second.
I solved this problem temporarily by removing wp_cache_flush(); I remove it from line 150 of the file class-permalink-watcher.php in the path includes > modules > woocommerce, but I want you to solve this problem fundamentally so that when I turn on the Remove category base option, I don’t face the permanent Flush Cache problem of the site.


