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