## Impacted versions:
 8.0 / 9.0 / 10.0
## Steps to reproduce:
* see https://github.com/odoo/odoo/issues/11841
* in a shell
  1. create an in memory record `order = self.env['purcahse.order'].new({....})`
  2. create an in memory record with a reference to the first one `order_line = self.env['purchase.order.line'].new({'order_id': order, ....})`
  3. order_line.order_id is an in memory recordset
  4. create a record for a model that inherits from mail.thread `self.env['product.product'].create({....})`
  5. At this stage order_line.order_id is an empty recordset

## Current behavior:
 In memory records are dropped when a call is done to self.invalidate_cache
## Expected behavior:
In memory records are preserved when a call is done to self.invalidate_cache


There are lot of places where the method `invalidate_cache` is called and the silent removal of the in memory records from all environments has unpredictable effects on fields modified by a computed method or an onchange or even related fields .... Moreover since all caches are invalidated each time you create / write / unlink  (https://github.com/odoo/odoo/blob/10.0/addons/mail/models/mail_followers.py#L111) an instance of a model that inherits from 'mail.thread', the performances of the server are severely penalized.

OPW703903

addons/mail/tests/test_mail_features.py
# Test: mail.compose.message: attachments
        for attach in compose.attachment_ids:
            self.assertIn((attach.datas_fname, attach.datas.decode('base64')), _attachments_test,
                            'compose wizard: mail.message attachment name / data incorrect')
        
        # CASE3: mass_mail on Pigs and Bird
        
        # Do: Compose in mass_mail_mode on pigs and bird
        compose_id = mail_compose.create(
            cr, user_raoul.id, {
                'subject': _subject,
                'body': '${object.description}',
                'partner_ids': [(4, p_c_id), (4, p_d_id)],
            }, context={
                'default_composition_mode': 'mass_mail',
                'default_model': 'mail.group',
                'default_res_id': False,
                'active_ids': [self.group_pigs_id, group_bird_id],
            })
        compose = mail_compose.browse(cr, uid, compose_id)
        # Do: Post the comment, get created message for each group
        mail_compose.send_mail(cr, user_raoul.id, [compose_id], context={
                        'default_res_id': -1,
                        'active_ids': [self.group_pigs_id, group_bird_id]
                    })
        # check mail_mail
        mail_mail_ids = self.mail_mail.search(cr, uid, [('subject', '=', _subject)])
        for mail_mail in self.mail_mail.browse(cr, uid, mail_mail_ids):
            self.assertEqual(set([p.id for p in mail_mail.recipient_ids]), set([p_c_id, p_d_id]),
                             'compose wizard: mail_mail mass mailing: mail.mail in mass mail incorrect recipients')