def clear_cache():
    ret = []
    for fn_ in os.listdir(__opts__['cachedir']):
        if fn_.endswith('.cache.p'):
            path = os.path.join(__opts__['cachedir'], fn_)
            if not os.path.isfile(path):
                continue
            os.remove(path)
            ret.append(fn_)
    return ret
%prog truncate linecount filename
dataset/ETHPy150Open saltstack/salt/salt/modules/state.py/clear_cache--crossover with--dataset/ETHPy150Open tanghaibao/jcvi/formats/base.py/truncate