def clear(prompt=True, cache=None):
    """Clear loady's cache."""
    cache = cache or config.cache()
    if prompt:
        answer = input(
            'Clear library cache files in %s/? (yN) ' % cache)
        if not answer.startswith('y'):
            return False
    shutil.rmtree(cache, ignore_errors=True)
    return True