feat(api): also clear cache when leaving a guild
This commit is contained in:
parent
5c57b75335
commit
439051999f
10 changed files with 53 additions and 0 deletions
|
|
@ -101,6 +101,14 @@ public partial class GuildsController
|
|||
guildId
|
||||
);
|
||||
|
||||
// Clear out the caches for this guild
|
||||
guildCache.Remove(guildId, out _);
|
||||
emojiCache.Remove(guildId);
|
||||
channelCache.RemoveGuild(guildId);
|
||||
roleCache.RemoveGuild(guildId);
|
||||
await memberCache.RemoveAllMembersAsync(guildId);
|
||||
await inviteCache.RemoveAsync(guildId);
|
||||
|
||||
_logger.Information("Left guild {GuildId} and removed all data for it", guildId);
|
||||
|
||||
return NoContent();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue