#Questions regarding caching system

3 messages · Page 1 of 1 (latest)

high flicker
#

I made a fight command for my game bot. It works great, but there's one major problem: It is slow. I found the issue that everytime a fight starts, the bot will get data from database, which can put a strain on the bot's response time. One of my friends suggested caching. Where do I start from caching?

warped garnetBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

high flicker
#

I read from the doc there is something called CacheFactory, but I am extremely new to caching, so how do I use that?