WordPress at Your Fingertips
function is not described

WC_Admin_Report::set_cached_query() protected WC 1.0

Set the cached query result.

{} It's a method of the class: WC_Admin_Report{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->set_cached_query( $query_hash, $data );
$query_hash(string) (required)
The query hash.
$data(mixed) (required)
The data to cache.

Code of WC_Admin_Report::set_cached_query() WC 5.8.0

protected function set_cached_query( $query_hash, $data ) {
	$class = strtolower( get_class( $this ) );

	if ( ! isset( self::$cached_results[ $class ] ) ) {
		self::$cached_results[ $class ] = get_transient( strtolower( get_class( $this ) ) );
	}

	self::add_update_transients_hook();

	self::$transients_to_update[ $class ]          = $class;
	self::$cached_results[ $class ][ $query_hash ] = $data;
}