sweeping the cache

hi, I obviously haven't ever used it, but is it recommended? And if I have GuildMembers intent, will it sweep that as well or what? I'm sorry I'm just pretty much new to cache sweeps, haven't digged into it yet & would appreciate someone's guide on that!
8 Replies
d.js toolkit
d.js toolkit3mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
d.js docs
d.js docs3mo ago
:guide: Miscellaneous: Cache customization - Sweeping caches read more
Mark
Mark3mo ago
there are some you shouldn't touch, as outlined in the guide. others can be swept periodically if you don't need the relevant data
Shrewd 💫
Shrewd 💫OP3mo ago
what would you consider relevant data as I said, im pretty much new to thsi whole topic haven't ever delved that much into cache to be honest
Mark
Mark3mo ago
that depends on your bot and what it does and what it needs and what data you're receiving in the first place - no point in sweeping the message cache if you don't have the GuildMessages intent, for example sweeping is just periodic removal of data from the cache to help reduce memory usage, so your use case is going to be dependent on what your bot does and needs. it's hard to say what you should be doing in general except for not touching the core caches (which don't take up much memory either)
Shrewd 💫
Shrewd 💫OP3mo ago
oh no well my bot doesnt do much besides just permission checks and accessing the database so im going to assume i dont need it right
Mark
Mark3mo ago
not unless memory use is an issue for your bot at the moment
Shrewd 💫
Shrewd 💫OP3mo ago
oh no its not okay thank youuu
Want results from more Discord servers?
Add your server