Compress and cache messages