(sender, instance, **kwargs)
Catches the post-save and post-delete signals of TrustedIdentityProvider
    to ensure that we immediately clear the related domain quickcaches
    for IdentityProvider.
    :param sender: The sender class (in this case AuthenticatedEmailDomain)
    :param instance: TrustedIdentityProvider - the instance being saved/deleted
    :param kwargs:
Catches the post-save and post-delete signals of TrustedIdentityProvider
    to ensure that we immediately clear the related domain quickcaches
    for IdentityProvider.
    :param sender: The sender class (in this case AuthenticatedEmailDomain)
    :param instance: TrustedIdentityProvider - the instance being saved/deleted
    :param kwargs:
Catches the post - save and post - delete signals of TrustedIdentityProvider to ensure that we immediately clear the related domain quickcaches for IdentityProvider . : param sender : The sender class ( in this case AuthenticatedEmailDomain ) : param instance : TrustedIdentityProvider - the instance being saved / deleted : param kwargs :
def clear_caches_when_trust_is_established_or_removed(sender, instance, **kwargs):
    """
    Catches the post-save and post-delete signals of TrustedIdentityProvider
    to ensure that we immediately clear the related domain quickcaches
    for IdentityProvider.
    :param sender: The sender class (in this case AuthenticatedEmailDomain)
    :param instance: TrustedIdentityProvider - the instance being saved/deleted
    :param kwargs:
    """
    instance.identity_provider.clear_domain_caches(instance.domain)
def clear_caches_when_trust_is_established_or_removed ( sender , instance , * * kwargs ) : instance . identity_provider . clear_domain_caches ( instance . domain )