-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 #17230
base: v3.8.5
Are you sure you want to change the base?
Conversation
1.taobao platform will clear tmp folder automatically. 2.when cachecount below 3, it will trigger LRU. 3.zip file, the path maybe is a zipfile.
Interface Check ReportThis pull request does not change any public interfaces ! |
return; | ||
let clearCachCount = Math.floor(caches.length / 3); | ||
// 大于3则清理1/3, 小于等于3则全部清理 | ||
if(clearCachCount > 3){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use caches.length >= 12 instead of clearCacheCount > 3.
And below, you can use caches.length < 3 instead of clearCacheCount === 0.
This way, when caches.length < 3, you won't need to execute Math.floor(caches.length / 3).
可以使用 caches.length >= 12 代替 clearCacheCount > 3
下面可以使用 caches.length < 3 代替 clearCachCount === 0
这样可以使得当 caches.length < 3 时不用执行 Math.floor(caches.length / 3)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to :
if(caches.length < 3){
console.warn("Due to caching large files in the game, there is insufficient storage space. Now starting forced cleaning.");
}
else{
caches.length = Math.floor(caches.length / 3);
}
…w 3 without div 3
if (caches.length === 0) { | ||
cleaning = false; | ||
return; | ||
// 大于3则清理1/3, 小于等于3则全部清理 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use english
Re: #
Changelog
Fixes #17040 : taobao Platform can not trigger clearLRU
Continuous Integration
This pull request:
Compatibility Check
This pull request: