offline: Infinity TTL, skip cached files, data version, first-launch preload offer, cache stats
This commit is contained in:
1 parent
ea947ede7a
commit
e4ddee924b
7 files changed
+121
-15
No files matched your search
@@ -146,6 +146,10 @@ export class OfflineManager {
|
||||
progress.current++;
|
||||
progress.file = file;
|
||||
|
||||
// Skip if already cached
|
||||
const cacheKey = `url:${file}`;
|
||||
if (await DataCache.get(cacheKey) !== null) continue;
|
||||
|
||||
// Use DataCache.fetch to cache the file in IndexedDB
|
||||
// The service worker will also cache it via runtime caching
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user