WordPress at Your Fingertips
function is not described

wc_set_template_cache() WC 4.3.0

Add a template to the template cache.

No Hooks.

Return

null. Nothing.

Usage

wc_set_template_cache( $cache_key, $template );
$cache_key(string) (required)
Object cache key.
$template(string) (required)
Located template.

Changelog

Since 4.3.0 Introduced.

Code of wc_set_template_cache() WC 5.6.0

function wc_set_template_cache( $cache_key, $template ) {
	wp_cache_set( $cache_key, $template, 'woocommerce' );

	$cached_templates = wp_cache_get( 'cached_templates', 'woocommerce' );
	if ( is_array( $cached_templates ) ) {
		$cached_templates[] = $cache_key;
	} else {
		$cached_templates = array( $cache_key );
	}

	wp_cache_set( 'cached_templates', $cached_templates, 'woocommerce' );
}