function makeCacheKey (opts) {
  if (!opts.origin) {
    throw new Error('opts.origin is undefined')
  }

  let fullPath
  try {
    fullPath = serializePathWithQuery(opts.path || '/', opts.query)
  } catch (error) {
    // If fails (path already has query params), use as-is
    fullPath = opts.path || '/'
  }

  return {
    origin: opts.origin.toString(),
    method: opts.method,
    path: fullPath,
    headers: opts.headers
  }
}
@param {import('../../types/dispatcher.d.ts').default.DispatchOptions} opts