def METHOD_NAME(self):
    """
    Ensure that the cache for IdentityProvider.does_domain_trust_this_idp
    is cleared when the status of a domain's subscription changes.
    """
    domain = Domain.get_or_create_with_name(
        "vaultwax-001",
        is_active=True
    )
    self.addCleanup(lambda: domain.delete())
    enterprise_plan = generator.get_enterprise_plan()
    self.assertFalse(self.idp.does_domain_trust_this_idp(domain.name))
    sub = Subscription.new_domain_subscription(
        self.idp.owner,
        domain.name,
        enterprise_plan,
    )
    self.assertTrue(self.idp.does_domain_trust_this_idp(domain.name))
    sub.is_active = False
    sub.save()
    self.assertFalse(self.idp.does_domain_trust_this_idp(domain.name))
    sub.is_active = True
    sub.save()
    self.assertTrue(self.idp.does_domain_trust_this_idp(domain.name))
    SubscriptionAdjustment.objects.all().delete()
    Subscription.visible_and_suppressed_objects.all().delete()
    self.assertFalse(self.idp.does_domain_trust_this_idp(domain.name))