WordPress at Your Fingertips
function is not described

WC_Admin_Report::get_cached_query() protected WC 1.0

Get the cached query result or null if it's not in the cache.

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

No Hooks.

Return

Mixed.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_cached_query( $query_hash );
$query_hash(string) (required)
The query hash.

Code of WC_Admin_Report::get_cached_query() WC 5.8.0

protected function get_cached_query( $query_hash ) {
	$class = strtolower( get_class( $this ) );

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

	if ( isset( self::$cached_results[ $class ][ $query_hash ] ) ) {
		return self::$cached_results[ $class ][ $query_hash ];
	}

	return null;
}