From 5027bdc172138808e65483ad016f7bf15a5d809d Mon Sep 17 00:00:00 2001 From: Aki Hamano Date: Sat, 6 Jul 2024 22:20:38 +0900 Subject: [PATCH] Delete only theme-related caches when saving changes --- includes/class-create-block-theme-api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-create-block-theme-api.php b/includes/class-create-block-theme-api.php index 604fa75b..bf570859 100644 --- a/includes/class-create-block-theme-api.php +++ b/includes/class-create-block-theme-api.php @@ -382,7 +382,7 @@ function rest_save_theme( $request ) { CBT_Theme_Styles::clear_user_styles_customizations(); } - wp_cache_flush(); + wp_get_theme()->cache_delete(); return new WP_REST_Response( array(