function cacheKey(start, end, size) {
  if (start < 0) {
    if (end !== undefined) throw new Error(`invalid suffix range [${start}, ${end}]`)
    if (size === undefined) return `${start},`
    return `${size + start},${size}`
  } else if (end !== undefined) {
    if (start > end) throw new Error(`invalid empty range [${start}, ${end}]`)
    return `${start},${end}`
  } else if (size === undefined) {
    return `${start},`
  } else {
    return `${start},${size}`
  }
}
Returns canonical cache key for a byte range 'start,end'.
Normalize int-range and suffix-range requests to the same key.

@import {AsyncBuffer, Awaitable, DecodedArray} from '../src/types.d.ts'
@param {number} start start byte of range
@param {number} [end] end byte of range, or undefined for suffix range
@param {number} [size] size of file, or undefined for suffix range
@returns {string}