Skip to content

Commit

Permalink
[v3.8.5] Don't use private properties in cache-manager.js. Add an int…
Browse files Browse the repository at this point in the history
…ernal getter for it.
  • Loading branch information
dumganhar committed Nov 13, 2024
1 parent de3f0c5 commit ee3b5b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions cocos/asset/asset-manager/asset-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,13 @@ export class AssetManager {

private constructor () {}

/**
* @engineInternal
*/
public get files() {

Check failure on line 337 in cocos/asset/asset-manager/asset-manager.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Missing return type on function

Check warning on line 337 in cocos/asset/asset-manager/asset-manager.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Missing space before function parentheses
return this._files$;
}

/**
* @engineInternal
*/
Expand Down
2 changes: 1 addition & 1 deletion platforms/minigame/common/engine/cache-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const cacheManager = {
}
for (let i = 0, l = caches.length; i < l; i++) {
const cacheKey = `${cc.assetManager.utils.getUuidFromURL(caches[i].originUrl)}@native`;
cc.assetManager._files.remove(cacheKey);
cc.assetManager.files.remove(cacheKey);
this.cachedFiles.remove(caches[i].originUrl);
}

Expand Down
2 changes: 1 addition & 1 deletion platforms/runtime/common/engine/cache-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const cacheManager = {
}
for (let i = 0, l = caches.length; i < l; i++) {
const cacheKey = `${cc.assetManager.utils.getUuidFromURL(caches[i].originUrl)}@native`;
cc.assetManager._files.remove(cacheKey);
cc.assetManager.files.remove(cacheKey);
this.cachedFiles.remove(caches[i].originUrl);
}

Expand Down

0 comments on commit ee3b5b9

Please sign in to comment.