Make cached message size limit configurable - messages_cache_threshold (#1489317)