-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Pics Cache Enhancements #409
base: master
Are you sure you want to change the base?
Pics Cache Enhancements #409
Conversation
… into feature-picscache-enhancements
v4 latest
@DoctorMcKay when are you finally implementing this feature? Do I have to keep maintaining and using my own fork? :( |
Could you resolve conflicts please? I'll merge it this week once conflicts are resolved. |
Done. Still needs a lint fix though. Also, I have not tested the new merged changes. So, I recommend testing them. Perhaps some tweaks and refactor could be good as well. The time I've been using this fork, I had no issues, except for the occasional "picscache not found for sub xxx" warnings, which I'm not sure why that happens. |
* @param {boolean} [inclTokens=false] - If true, automatically retrieve access tokens if needed | ||
* @param {function} [callback] | ||
* @param {boolean} inclTokens - If true, automatically retrieve access tokens if needed | ||
* @param {function} callback |
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.
Oops, unwanted change.
// that things work regardless of whether there's a NUL byte at the end, just remove it if it's there. | ||
appInfoVdf = appInfoVdf.replace(/\0$/, ''); | ||
let appinfo = null; | ||
if (app.buffer) { |
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.
Maybe this is why sometimes pics cache is missing? hmm
// console.log( | ||
// "requestType:", requestType, | ||
// "app request:", appids.length, | ||
// "pkg request:", packageids.length, | ||
// "app unknown:", response.unknownApps.length, | ||
// "pkg unknown:", response.unknownPackages.length, | ||
// "app cache:", Object.keys(cached.apps).length, | ||
// "pkg cache:", Object.keys(cached.packages).length, | ||
// "app to refresh:", apps.length, | ||
// "pkg to refresh:", packages.length, | ||
// ); |
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.
This is really useful for debugging, but you may want to remove it.
} | ||
|
||
if (this.options.picsCacheAll && this.options.savePicsCache) { | ||
this._warn('Both picsCacheAll and savePicsCache are enabled. Unless a custom storage engine is used, beware that this will cause a lot of disk IO and space usage!'); |
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.
Maybe remove this warning? I have been seeing this every time I start my bot.
Btw, may be worth checking our past discussion: #389 |
Original: #389