Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

385 adapter the taobaominigame ClearLRU procedure #17192

Closed
wants to merge 0 commits into from

Conversation

tangkaikk
Copy link

@tangkaikk tangkaikk commented Jun 19, 2024

Re: #

Changelog

Fixes #17040 : taobao Platform can not trigger clearLRU
*


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

Copy link

Interface Check Report

This pull request does not change any public interfaces !

caches.length = Math.floor(caches.length / 3);
if (caches.length === 0) {
cleaning = false;
console.warn("Please check for large files or multiple large files being downloaded simultaneously.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cleaning process of cache files was immediately interrupted due to an exception. Using 'return' here will still cause the cleaning process to be interrupted once. In principle, it is not advisable to interrupt this process. I think it is a better way to fix it if we can ensure that the process can proceed smoothly while throwing an exception.
In addition, I suggest writing the string in the warning as follows:
Due to the caching of large files in the game, there is insufficient storage space. Now starting to perform forced cleaning.

因为发生了异常所以导致缓存文件的清理流程被立即中断,此处使用 return 依然会导致清除流程被中断一次,原则上不太应该中断这次流程,如果可以在抛出异常的同时保证流程可以顺利进行,我觉得这是更好的修复方式。
另外在 warn 中的字符串建议这样写:
因为游戏缓存了较大的文件导致存储空间不足,现在开始执行强制清除。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

taobao Platform can not trigger clearLRU
3 participants