Skip to content

Commit 79b6845

Browse files
committed
Flush object cache after deleting all oEmbed caches
1 parent 9e104f5 commit 79b6845

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/Cache_Command.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ public function clear( $args, $assoc_args ) {
7575
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
7676
$wpdb->query( "DELETE FROM {$wpdb->posts} WHERE post_type = 'oembed_cache'" );
7777

78+
if ( function_exists( 'wp_cache_flush' ) ) {
79+
wp_cache_flush();
80+
}
81+
7882
WP_CLI::success( 'Cleared all oEmbed caches.' );
7983
return;
8084
}

0 commit comments

Comments
 (0)