pub async fn invalidate_channel(guild_id: GuildId, channel_id: ChannelId)Expand description
Drops every cached view of channel_id.
Both caches hold permission overwrites, and those decide whether a linked channel may be expanded. Serving them after Discord has changed them means authorizing against permissions that no longer exist — a channel made private would keep being treated as public. Callers invoke this from the gateway events that report such a change.
The whole guild’s channel list goes too, not just the one entry: the list is a single cached value holding every channel’s overwrites, so there is no way to replace one member of it.