def write(self, repository, codename, component, arch, package, version, data):
        cache_file_path = self.cache_path(repository, codename, component, arch, package, version)
        try:
            if not os.path.exists(os.path.dirname(cache_file_path)):
                os.makedirs(os.path.dirname(cache_file_path))

            json.dump(data, open(cache_file_path, 'w'))
        except Exception as e:
            app.logger.warn('Unable to write cache %s to disk' % cache_file_path)
            app.logger.warn(e)
            raise
dataset/ETHPy150Open baseblack/ReproWeb/reproweb/backend.py/PackageCache.write/original