CacheEntry = object mid*: MessageID topicIDs*: seq[string]
MCache = object of RootObj msgs*: Table[MessageID, Message] history*: seq[seq[CacheEntry]] windowSize*: Natural
func contains(c: MCache; mid: MessageID): bool {....raises: [Defect], tags: [].}
func get(c: MCache; mid: MessageID): Option[Message] {....raises: [Defect], tags: [].}
func init(T: type MCache; window, history: Natural): T:type {....raises: [Defect].}
func put(c: var MCache; msgId: MessageID; msg: Message) {....raises: [Defect], tags: [].}
func shift(c: var MCache) {....raises: [Defect], tags: [].}
func window(c: MCache; topic: string): HashSet[MessageID] {....raises: [Defect], tags: [].}