def METHOD_NAME(self, line, exp_principal, exp_cache):
    try:
        princ, cache = line.split()
    except ValueError:
        return False
    if exp_cache is not None and cache != exp_cache:
        return False
    if exp_principal != princ:
        return False
    return True