Keeping all the message IDs in memory to check for the possible duplicates (given that the deduplication feature is enabled), might result in way too much memory being used for the large number of messages. Instead, the number of cached IDs should be limited either by the message's amount or the time range, e.g. 1 hour or 1 day.