There are two caching configuration options in Roundcube, if both are disabled (default) nothing is cached. If imap_cache is enabled, Roudcube will cache folder lists, metadata, counters, etc. If you enable messages_cache Roundcube will store messages data like headers (not all) and short (mostly text) message parts and message indexes (lists of message UIDs per folder, thread structures). Note that it stores only messages viewed by the user, so if there's 10k messages in a folder but user listed/viewed only 100, Roundcube will store data of only 100 messages.