If you have a closer look at the code, you would see, that the message is not cached twice but it is decided where to cache it.
For caching messages with large attachments we run into problems when writing them to the database for caching. Therefore RC creates a temp file with the message content. For smaller messages RC still uses the database for faster access. The size limit (usually what max_packet_size is set to in MySQL databases) can be configured.
Regards, Thomas
Geuis Teses wrote:
In this code in func.inc, it looks like RC is caching a message both to the database and to the local temp directory. Why does it cache 2 times?
[...]