def get(self, key: str, format: str = 'html') -> Optional[bytes]:
loop = asyncio.get_event_loop()
cache_get = self._cache.get
data = await loop.run_in_executor(None, cache_get, key + format)
if data is not None:
res = await loop.run_in_executor(None, lzma.decompress, data)
return res
评论列表
文章目录