使用 aiohttp 维护客户端 http 缓存 [英] Maintain a client-side http cache with aiohttp

查看:51
本文介绍了使用 aiohttp 维护客户端 http 缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 cache-control + requests 它适用于本地文件系统缓存.我希望使用 aiohttp-client 将此迁移到异步项目,看起来没有任何可以使用它的客户端缓存库?

I have a synchronous app using cache-control + requests which works well with a local filesystem cache. I'm looking to migrate this to an async project using aiohttp-client however, it looks like there aren't any client-side caching libraries that work with it?

Python 中是否有任何异步 HTTP 客户端可以使用本地缓存?

Are there any async HTTP clients in Python that I can use a local cache with?

推荐答案

aiohttp-client-cache 库与 aiohttp-client 一起使用,可用于 在本地文件系统上存储缓存.

The aiohttp-client-cache library works with aiohttp-client and can be used to store cache on a local filesystem.

这篇关于使用 aiohttp 维护客户端 http 缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆