def invalidate_m2m(sender=None, instance=None, model=None, action=None, pk_set=None, **kwargs): """ Invoke invalidation on m2m changes. """ if action in ('post_add', 'post_remove', 'post_clear'): invalidate_model(sender) # NOTE: this is harsh, but what's the alternative? invalidate_obj(instance)
def invalidate_m2m(sender=None, instance=None, model=None, action=None, pk_set=None, **kwargs): """ Invoke invalidation on m2m changes. """ if action in ("post_add", "post_remove", "post_clear"): invalidate_model(sender) # NOTE: this is harsh, but what's the alternative? invalidate_obj(instance) # TODO: more granular invalidation for referenced models invalidate_model(model)
def invalidate_m2m(sender=None, instance=None, model=None, action=None, pk_set=None, **kwargs): """ Invoke invalidation on m2m changes. """ if action in ('post_add', 'post_remove', 'post_clear'): invalidate_model( sender) # NOTE: this is harsh, but what's the alternative? invalidate_obj(instance)