def flush_cached_instance(sender, instance, **kwargs):
 if (not hasattr(instance, 'flush_cached_instance')):
  return
 sender.flush_cached_instance(instance, force=True)

def flush_cached_instance ( sender , instance , ** kwargs ) : if ( not hasattr ( instance , 'flush_cached_instance' ) ) : return sender . flush_cached_instance ( instance , force = True )
flush the idmapper cache only for a given instance .