mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-10-09 23:35:22 +00:00
[adapters] 修复未同步 cacheFiles 的问题,并降低通信消耗
This commit is contained in:
@@ -189,7 +189,7 @@ var cacheManager_worker = {
|
||||
self.cachedFiles[id] = { bundle: cacheBundleRoot, url: localPath, lastTime: time };
|
||||
delete self.cacheQueue[id];
|
||||
self.writeCacheFile();
|
||||
// TODO main.assetManager.addCachedFiles([[id, cacheBundleRoot, localPath, time]]);
|
||||
main.assetManager.addCachedFiles([id, cacheBundleRoot, localPath, time]);
|
||||
if (_callback) _callback(id, cacheBundleRoot, localPath, time);
|
||||
}
|
||||
if (!isEmptyObject(self.cacheQueue)) {
|
||||
@@ -334,7 +334,7 @@ var cacheManager_worker = {
|
||||
}
|
||||
self.cachedFiles[id] = { bundle: cacheBundleRoot, url: targetPath, lastTime: time };
|
||||
self.writeCacheFile();
|
||||
main.assetManager.addCachedFiles([[id, cacheBundleRoot, targetPath, time]]);
|
||||
main.assetManager.addCachedFiles([id, cacheBundleRoot, targetPath, time]);
|
||||
onComplete && onComplete(null, targetPath);
|
||||
});
|
||||
},
|
||||
|
Reference in New Issue
Block a user