def should_skip_build_cache():
    """
    This function should be called by cache implementations to determine whether the cache should be skipped or not
    """
    global skip_cache_flag
    if skip_cache_flag:
        return True
    skip_percentage = aitemplate_env.ait_build_cache_skip_percentage()
    if skip_percentage is not None:
        skip_percentage = int(skip_percentage)
        assert (
            skip_percentage >= 0 and skip_percentage <= 100
        ), f"Skip percentage has to be in the range [0,100]. Actual value: {skip_percentage}"
        if skip_percentage == 100:
            return True
        if skip_percentage == 0:
            return False
        rndi = random.randint(0, 99)
        if rndi < skip_percentage:
            return True
    return False
This function should be called by cache implementations to determine whether the cache should be skipped or not
python/aitemplate/backend/build_cache_base.py