WC_Admin_Report::set_cached_query( string $query_hash, mixed $data )

Set the cached query result.


Description Description


Parameters Parameters

$query_hash

(Required) The query hash.

$data

(Required) The data to cache.


Top ↑

Source Source

File: includes/admin/reports/class-wc-admin-report.php

	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;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.