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
- 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 OPthere are some you shouldn't touch, as outlined in the guide. others can be swept periodically if you don't need the relevant data
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
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)
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
not unless memory use is an issue for your bot at the moment
oh no its not
okay thank youuu