How big is the difference between xyz.cache.get() and await xzy.fetch()?

fetch returns the cached thing aswell if it exists, so except the Promise difference i see not really a problem with using await fetch all the time. Is this consider bad practise? & How big is the difference time & performancewise?
5 Replies
miss_makima77
miss_makima772y ago
Should be negligible in both terms and I don't think it's a bad practice... cause it will check from cache first and if not found in cache then it will fetch it(unless you are force fetching)
ararou!
ararou!2y ago
in some scenarios you’ll better off using fetch like if so a member hasn’t send a msg or smth sometimes that isn’t in cache afaik anyway
chillihero
chilliheroOP2y ago
what is the „downside“ of using fetch? if there is one
ararou!
ararou!2y ago
I haven’t had any issues with it from my usage
Favna
Favna2y ago
you cannot use fetch without async that can be an issue in some situations
Want results from more Discord servers?
Add your server