def clear_cache():
    '''
    Completely clear hgfs cache
    '''
    fsb_cachedir = os.path.join(__opts__['cachedir'], 'hgfs')
    list_cachedir = os.path.join(__opts__['cachedir'], 'file_lists/hgfs')
    errors = []
    for rdir in (fsb_cachedir, list_cachedir):
        if os.path.exists(rdir):
            try:
                shutil.rmtree(rdir)
            except __HOLE__ as exc:
                errors.append('Unable to delete {0}: {1}'.format(rdir, exc))
    return errors
dataset/ETHPy150Open saltstack/salt/salt/fileserver/hgfs.py/clear_cache