Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Enable guild caching #206

Closed
wants to merge 2 commits into from
Closed

Enable guild caching #206

wants to merge 2 commits into from

Conversation

dlsf
Copy link
Member

@dlsf dlsf commented Jun 5, 2021

This will (hopefully) solve the issue that the member count is null on /info

@dlsf dlsf added the bug Something isn't working label Jun 5, 2021
@dlsf dlsf requested review from JohnnyJayJay and a team June 5, 2021 21:31
@dlsf dlsf self-assigned this Jun 5, 2021
@DRSchlaubi
Copy link
Contributor

This sounds like a bad idea

Copy link
Contributor

@DRSchlaubi DRSchlaubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implementation("dev.kord", "kord-core", "0.7.x-SNAPSHOT")

Need to change this too or you will get issues with ktor 1.6

@DRSchlaubi
Copy link
Contributor

The problem here isn't that the Guild cache isn't enabled. It's that you try to fetch the guild before the ready event get's fired so the guild can't be cached yet and has to be resolved through rest.
so best way of handeling this would probabbly be to fetch the guild each time you need it

The guild cache is enabled per default and this shouldn't change anything

Also let's poke @BartArys to fix: kordlib/kord#55

@dlsf
Copy link
Member Author

dlsf commented Jun 5, 2021

Thanks for the clarification

@DRSchlaubi DRSchlaubi mentioned this pull request Jul 17, 2021
Comment on lines +81 to +85
cache {
guilds { cache, description ->
MapEntryCache(cache, description, MapLikeCollection.concurrentHashMap())
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still won't have any effect since guild caching is a thing that is enabled by default

@DRSchlaubi
Copy link
Contributor

This PR will be superseded buy an upcoming PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants