async function clearBrowserCaches(session) {
  const status = {msg: 'Cleaning browser cache', id: 'lh:storage:clearBrowserCaches'};
  log.time(status);

  const warnings = [];

  try {
    // Wipe entire disk cache
    await session.sendCommand('Network.clearBrowserCache');
    // Toggle 'Disable Cache' to evict the memory cache
    await session.sendCommand('Network.setCacheDisabled', {cacheDisabled: true});
    await session.sendCommand('Network.setCacheDisabled', {cacheDisabled: false});
  } catch (err) {
    if (/** @type {LH.LighthouseError} */ (err).code === 'PROTOCOL_TIMEOUT') {
      log.warn('Driver', 'clearBrowserCaches timed out');
      warnings.push(str_(UIStrings.warningCacheTimeout));
    } else {
      throw err;
    }
  } finally {
    log.timeEnd(status);
  }

  return warnings;
}
Clear the network cache on disk and in memory.
@param {LH.Gatherer.ProtocolSession} session
@return {Promise<LH.IcuMessage[]>}