feat(version): derive data cache version from content hash of the data tree
Replace the hand-maintained DATA_VERSION constant with a build-time SHA-256 hash of static/data/ embedded as a 'version' field in the preload manifest. The runtime reads it via fetchWithFallback and clears the IDB cache when it differs, so any data edit auto-invalidates cached data — no manual bump to forget. The no-version (offline/stale) and IDB read-error guards are kept, so the cache is never wiped on an unreadable signal. Closes audit item L1.
This commit is contained in:
1 parent
f534fe6006
commit
baf2baf65d
5 files changed
+68
-18
No files matched your search
@@ -5260,5 +5260,6 @@
|
||||
"bible": [
|
||||
"/data/bible/versions.json"
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "7631e35da99e"
|
||||
}
|
||||
Reference in new issue
Block a user