$cache_group = 'theme_json';
$cache_key = 'wp_get_global_settings_' .
$origin;
/*
* Ignore cache when the development mode is set to 'theme', so it doesn't interfere with the theme
* developer's workflow.
*/
$can_use_cached = !
wp_is_development_mode( 'theme'
);
$settings = false;
if ( $can_use_cached ) { $settings =
wp_cache_get( $cache_key,
$cache_group );
} if ( false ===
$settings ) { $settings = WP_Theme_JSON_Resolver::
get_merged_data( $origin )->
get_settings();
if ( $can_use_cached ) { wp_cache_set( $cache_key,
$settings,
$cache_group );
} }