.add(channelId, data)
channelId: string, data: APIMessage → void
messageCache.add(channelId, data);Class
Per-channel message cache with FIFO eviction.
false limit → caching disabledInfinity / unbounded → no per-channel capOuter map of channel caches is itself FIFO-bounded by getChannelLimit. get never creates empty maps (use add).
new MessageCache(getLimit: () => MessageLimit, getChannelLimit: () => number)() => MessageLimit() => numberchannelId: string, data: APIMessage → void
messageCache.add(channelId, data);channelId: string → void
messageCache.clearChannel(channelId);channelId: string → Map<string, APIMessage> | null
Return the existing per-channel map, or null if disabled / not yet created. Does **not** create empty maps.
messageCache.get(channelId);channelId: string, messageId: string → void
messageCache.remove(channelId, messageId);→ void
messageCache.reset();messageCache.stats();filter?: (message: APIMessage, channelId: string) => boolean, channelId?: string → number
messageCache.sweep();