WC_Admin_Report::get_cached_query()
Get the cached query result or null if it's not in the cache.
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.
WC_Admin_Report::get_cached_query() WC Admin Report::get cached query code WC 9.7.1
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; }