'Save data to the cache file.'

def _save_cache(self):

    safe_makedirs(self.cache_dir)
    try:
        with open(self.cache_file, 'wb') as f:
            pickle.dump(self.data, f)
    except Exception as e:
        logger.error('Cannot    write    version    to    cache    file    {}    ({})'.format(self.cache_file, e))
