def save_to_cache(obj, filename):
    filename = '%s/%s.pkl' % (config.CACHEDIR, filename)
    if config.CACHETYPE == 'joblib':
        joblib.dump(obj, filename, compress=9)
    elif config.CACHETYPE == 'pickle':
        f = open('cache/%s.pkl' % filename, 'w')
        pickle.dump(obj, f, 2)
        f.close()
    else:
        raise ValueError('Unkown CACHETYPE %s, use only pickle or joblib' % config.CACHETYPE)
dataset/ETHPy150Open theusual/kaggle-seeclickfix-ensemble/Miroslaw/utils.py/save_to_cache/original