From 83957192c3b447c5acf0aaaddb6acb149bc8c09f Mon Sep 17 00:00:00 2001 From: Ravinder Kumar Date: Mon, 15 Jan 2024 11:04:17 +0530 Subject: [PATCH] Update uninstall.php Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com> --- uninstall.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/uninstall.php b/uninstall.php index e61551f0c..271fdb2cb 100644 --- a/uninstall.php +++ b/uninstall.php @@ -31,9 +31,12 @@ $wpdb->query( "DELETE meta FROM $wpdb->postmeta meta LEFT JOIN $wpdb->posts posts ON posts.ID = meta.post_id WHERE posts.ID IS NULL OR meta.meta_key LIKE 'dt\_%';" ); // Clear cache. - if ( wp_cache_flush() ) { - wp_cache_set_posts_last_changed(); - } + wp_cache_set_posts_last_changed(); + wp_cache_delete( 'alloptions', 'options' ); + + // The cache for individual posts will need to be removed (it doesn't use last changed) + // The cache for individual options will need to be removed + // On sites will a persistent cache, the transients will need to be removed too } // phpcs:enable