

def set(self, page_range_key, tree):
    xml = etree.tostring(tree, encoding='utf-8', pretty_print=False, xml_declaration=True)
    cache_file = self.get_cache_file(page_range_key, 'w')
    cache_file.writestr(self.get_cache_filename(page_range_key), xml)
    cache_file.close()

dataset/ETHPy150Open jcushman/pdfquery/pdfquery/cache.py FileCache.set/original