Files
NapCatQQ/.pnpm-store/v3/files/0a/b8d2e44e475d87e20cdb13b0ea3155c997d3801e1cfe2cc8b0ad5b33ca5b216ab91118ed98e39c9fbc484413e2bb0bfc4c0960bde054b147b0d9f564f80f78
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

18 lines
430 B
Plaintext

const { URL, format } = require('url')
// options passed to url.format() when generating a key
const formatOptions = {
auth: false,
fragment: false,
search: true,
unicode: false,
}
// returns a string to be used as the cache key for the Request
const cacheKey = (request) => {
const parsed = new URL(request.url)
return `make-fetch-happen:request-cache:${format(parsed, formatOptions)}`
}
module.exports = cacheKey