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

Remove member from cache when ban #180

Merged
merged 4 commits into from
Aug 15, 2024

Conversation

PyGaVS
Copy link
Collaborator

@PyGaVS PyGaVS commented Aug 1, 2024

What are the changes?

Removing the member from the server cache :
marshaller.cache.remove(memberCacheKey)
And updating the server in the cache :
marshaller.cache.put(serverCacheKey, rawServer)

How to test the changes?

Replace that :

await Future.wait([
      marshaller.cache.put(serverCacheKey, rawServer),
      marshaller.cache.put(channelCacheKey, rawChannel)
    ]);

By that :

marshaller.cache.has(memberCacheKey).then((value) => print(value));
    await Future.wait([
      marshaller.cache.remove(memberCacheKey),
      marshaller.cache.put(serverCacheKey, rawServer),
    ]).then((value) => marshaller.cache.has(memberCacheKey).then((value) => print(value)));

It should log true at the beginning when the member is not removed from the cache and false and the end when the member is removed.

lib/.DS_Store Outdated Show resolved Hide resolved
.DS_Store Outdated Show resolved Hide resolved
@PandaGuerrier PandaGuerrier merged commit ff7f5ef into 4.0.x Aug 15, 2024
@PandaGuerrier PandaGuerrier deleted the feat/implement-cache-remover-member-remove branch August 15, 2024 14:18
@PyGaVS PyGaVS changed the title remove member from cache when ban Remove member from cache when ban Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants