Skip to content

Commit

Permalink
Update uninstall.php
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Wilson <[email protected]>
  • Loading branch information
ravinderk and peterwilsoncc authored Jan 15, 2024
1 parent 76eb110 commit 8395719
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8395719

Please sign in to comment.