Pincer icon indicating copy to clipboard operation
Pincer copied to clipboard

♻️ Moving cached objects to a cache object

Open zunda-arrow opened this issue 4 years ago • 3 comments

For example

# current
Client.guilds
# With cache
Client.cache.guilds

Hikari and Serenity do this. I think it's a much better decision over all since I think it'll simplify storing voice states once we get to that.

zunda-arrow avatar Dec 28 '21 17:12 zunda-arrow

I currently am working on this

Enderchief avatar Dec 28 '21 17:12 Enderchief

Instead of just a dictionary, I'm using a custom object which wraps around a deque mainly so I can have a max length (default 100) and automatically remove the oldest item.

I've implemented (locally) guilds and messages. Also this allows the message delete event to find the deleted message (provided that it's in the cache)

Enderchief avatar Dec 28 '21 17:12 Enderchief

🚀 🚀 🚀

zunda-arrow avatar Dec 28 '21 17:12 zunda-arrow

Closed due to depreciation, thank you for your effort ♥

Arthurdw avatar Dec 26 '22 13:12 Arthurdw