[Beta Tester] Flush cache after deleting option and resetting PHP rate limit (#50512)

* Flush cache after deleting option and resetting PHP rate limit

* Add changelog
This commit is contained in:
Chi-Hsuan Huang 2024-08-12 18:05:01 +08:00 committed by GitHub
parent 9297409c5a
commit 9bc69246ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View File

@ -61,6 +61,7 @@ function wca_test_helper_delete_option( $request ) {
)
);
wp_cache_flush();
return new WP_REST_RESPONSE( null, 204 );
}

View File

@ -119,8 +119,7 @@ function reset_php_rate_limit() {
$wpdb->query(
"DELETE FROM {$wpdb->prefix}wc_rate_limits"
);
WC_Cache_Helper::invalidate_cache_group( WC_Rate_Limiter::CACHE_GROUP );
wp_cache_flush();
return new WP_REST_Response( array( 'success' => true ), 200 );
}

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Flush cache after deleting option and resetting PHP rate limit