How messages will be cached as chunks.
Each peer MUST cache all chunks that are part of an outgoing message, irrespective of whether the connection is still alive or has already been severed. The peer MUST also remember the associated sequence number. In order to do so, the peer can increment a counter every time a message is appended to the chunk cache. Chunks of messages that are in the Chunk Cache Blacklist MUST also be added to the cache and specifically tagged as blacklisted chunks. Alternatively, a placeholder for the blacklisted chunks can be added to the cache which explicitly tags chunks as blacklisted.
When a update/connectionAck
message has been received, the
cache MUST be updated by removing all cached chunks that have been
acknowledged.
If memory usage of the chunk cache is becoming an issue for a peer, it
SHOULD explicitly request an acknowledgement by sending a
request/connectionAck
.