Automattic\WooCommerce\Admin\API\Reports
DataStore::get_cache_key()
Returns string to be used as cache key for the data.
Метод класса: DataStore{}
Хуков нет.
Возвращает
Строку
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_cache_key( $params );
- $params(массив) (обязательный)
- Query parameters.
Код DataStore::get_cache_key() DataStore::get cache key WC 9.5.1
protected function get_cache_key( $params ) { if ( isset( $params['force_cache_refresh'] ) ) { if ( true === $params['force_cache_refresh'] ) { $this->force_cache_refresh = true; } // We don't want this param in the key. unset( $params['force_cache_refresh'] ); } if ( true === $this->debug_cache ) { $this->debug_cache_data['query_args'] = $params; } return implode( '_', array( 'wc_report', $this->cache_key, md5( wp_json_encode( $params ) ), ) ); }