You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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
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
If it is a follow up of another issue, I have specified it.
The text was updated successfully, but these errors were encountered: