<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def invalidate_m2m_cache(sender, instance, model, **kwargs):
 """ Signal receiver for models to invalidate model cache for many-to-many relationship. Parameters ~~~~~~~~~~ sender The model class instance The instance whose many-to-many relation is updated. model The class of the objects that are added to, removed from or cleared from the relation. """

    logger.debug('Received m2m_changed signals from sender {0}'.format(sender))
    update_model_cache(instance._meta.db_table)
    update_model_cache(model._meta.db_table)