test(2meet-data-optimizer): live tools no longer flush the object cache
- mut.php called wp_cache_flush() after each write and qbench.php wp_cache_flush_group() before each run; with Redis Object Cache's selective flush both are one server-side Lua scan over the site's keys, which blocked the shared Redis for 5–20 s on dev36 (3 M keys) and broke other sites' requests (BUSY / read errors) - mut.php clears the touched post or user caches plus the runtime cache; qbench.php bumps the routed count version (posts' last_changed before 1.3.0) - tests/ is not packaged; plugin code does not flush
This commit is contained in:
@@ -40,7 +40,12 @@ foreach ( $cases as $name => $qa ) {
|
||||
$err = '';
|
||||
$sql = '';
|
||||
for ( $i = 0; $i < $iters; $i++ ) {
|
||||
wp_cache_flush_group( 'tmdo_found_rows' );
|
||||
// Fresh routed counts without wp_cache_flush_group() (a Redis-blocking server-side scan).
|
||||
if ( method_exists( 'TMDO_Post_Query_Router', 'bump_count_version' ) ) {
|
||||
TMDO_Post_Query_Router::bump_count_version();
|
||||
} else {
|
||||
wp_cache_set_last_changed( 'posts' ); // Core < 1.3.0 keyed the counts on posts' last_changed.
|
||||
}
|
||||
$wpdb->last_error = '';
|
||||
$t = microtime( true );
|
||||
$q = new WP_Query( $qa + array( 'fields' => 'ids', 'cache_results' => false, 'suppress_filters' => false ) );
|
||||
|
||||
Reference in New Issue
Block a user