fix(pwa): 🐛 remove randomness from cache version getter
This commit is contained in:
parent
ae1b87c253
commit
5716284c73
|
@ -7,8 +7,7 @@ import { encodeBase64 } from '@std/encoding'
|
|||
export type PrecacheResponse = { version: string; preCachedUrls: string[] }
|
||||
|
||||
async function getVersion() {
|
||||
const versionRaw = crypto.randomUUID() + BUILD_ID
|
||||
const versionBytes = new TextEncoder().encode(versionRaw)
|
||||
const versionBytes = new TextEncoder().encode(BUILD_ID)
|
||||
const versionHash = await crypto.subtle.digest('SHA-256', versionBytes)
|
||||
return encodeBase64(versionHash)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue