message caching is done here instead of on the transport layer