Closed soekarnohatta closed 4 years ago
@soekarnohatta Agree, That's how Rose did it as well.
On the API end, its not too heavy to fetch admins, its only heavy to ban and unban. I dont see a point caching this. The cache can anytime go outta sync
Though It would speed up
On the API end, its not too heavy to fetch admins, its only heavy to ban and unban. I dont see a point caching this. The cache can anytime go outta sync
There must be a gap to get list of admins when using API calls, cache may speed up, especially when the bot has a lot of users...
On the API end, its not too heavy to fetch admins, its only heavy to ban and unban. I dont see a point caching this. The cache can anytime go outta sync
Imagine having bot like Rose with 4 millions users..
On the API end, its not too heavy to fetch admins, its only heavy to ban and unban. I dont see a point caching this. The cache can anytime go outta sync
Imagine having bot like Rose with 4 millions users..
Only on that case, you need a cache, gingko hardly i even used lmao --edit-- Even Rose's stuff doesn't make sense to me tbh. They can cache other stuff stored on main db to redis rather than admins. Its seriously not at all heavy. You wont get rate limited for fetching the users even 6969 times
@baalajimaestro Well, Who knows what would happen? Do it sooner than later.
@RealAkito this ^
I agree caching is necessary in the long run for scalability, however I'm pretty swamped rn, and the welcome module implementation is still WIP.
I'll be very glad to merge anyone PRing cache-related features.
@baalajimaestro @Oc69bot is very sad :^)
Alright then
@RealAkito edited previous comment
@baalajimaestro Imagine you ask something to a teacher many times, not only the teacher get tired, but you also get tired because of asking many times.
This cause an unnecessary API calls and a waste of time,bandwidth...
@baalajimaestro Imagine you ask something to a teacher many times, not only the teacher get tired, but you also get tired because of asking many times.
This cause an unnecessary API calls and a waste of time,bandwidth...
Its not heavy call at all.
@baalajimaestro Imagine you ask something to a teacher many times, not only the teacher get tired, but you also get tired because of asking many times. This cause an unnecessary API calls and a waste of time,bandwidth...
Its not heavy call at all.
In Rose, The API gonna delay if the bot is sending too much requests. It indeed the heavy and unnecessarily call to API at all, caching it would completely prevented the problem
I'm going to lock this conversation with these closing comments:
Now, I'll be accepting PRs for caching functionality; however, the caching should be applied somewhere it's actually necessary.
Just for reference, the heaviest calls that Ginko faces right now is the database. We have practically no network requests other than the ping function.
it is inefficient to call API everytime. We can use some caching methods to cache the admins instead of calling API. Redis or BigCache may help us to cache some bit of data like admins and manymore