Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to configure the guild member cache to only store the current user's members #878

Open
1 task
FasterSpeeding opened this issue Nov 4, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@FasterSpeeding
Copy link
Collaborator

FasterSpeeding commented Nov 4, 2021

Summary

Add a cache config bool flag which sets the member cache store to only cache the current user's members.

Problem

There's plenty of cases where having the current user's member cached will be significantly more helpful than having every member cached and enforcing either all or none will make these cases use a lot more memory then they need to. This will be even more helpful once the thread cache store is implemented as this will only work properly if the current member is cached and will likely raise a configuration error if it is not.

Ideal implementation

A bool config value on the cache config which sets the member cache to current user only, the strategy for this should enforce that the current user cache store is enabled (this will be relevant once #636) is merged and rely on the detail that the current user store should always be set once the bot has started.

For intent warnings its worth noting that we get events for the current guild member regardless of whether the GUILD_MEMBERS intent is declared or not.

It's also worth noting that in terms to #748 this boolean flag will have to be standard rather than implementation detail of the current cache since it changes the nature of the member cache dependent on whether its enabled (so whether the member cache is a full or partial view). should be impl detail of the standard cache.

Checklist

  • I have searched the issue tracker and have made sure it's not a duplicate.
    If it is a follow up of another issue, I have specified it.
@FasterSpeeding FasterSpeeding added the enhancement New feature or request label Nov 4, 2021
@FasterSpeeding FasterSpeeding changed the title Ability configure the guild member cache store to own member only Ability configure the guild member cache to only store the current user's members Nov 4, 2021
@FasterSpeeding FasterSpeeding changed the title Ability configure the guild member cache to only store the current user's members Ability to configure the guild member cache to only store the current user's members Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant