Java 磁盘缓存 http 库:存在吗?
据我所知,Apache HttpClient 没有缓存,所以我的问题是您知道可以缓存到磁盘的 Http 库吗?自己实现它会很有趣,但在我这样做之前,最好检查它是否已经存在:-)
要求: 支持 HTTP 1.1 可以缓存到磁盘(例如:文件夹) 支持磁盘上的最大缓存大小 支持电子标签
Apache HttpClient does not have caching as far as I can see so my question is do you know about a Http library that can cache to disk? It would be fun to implement it myself but before i do it, it is better to check if it already exists :-)
Requirements:
Support for Http 1.1
Can cache to disk (ex: a folder)
Support for a maximum cache size on disk
Support for eTag
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
HTTPCache4j 实现了一个客户端缓存,该缓存声称实现了 HTTP 1.1 客户端缓存所需的功能。尽管是一个新项目,但它可能值得一试。
磁盘存储似乎不是使用人类可读文件来实现的 - 它们涉及 HTTP 资源的序列化副本,但我可能是错的。
HTTPCache4j implements a client-side cache that claims to implement the features expected of a HTTP 1.1 client cache. It might be worth checking out despite being a new project.
Disk stores do not seem to be implemented using human readable files - they involve serialized copies of HTTP resources, but I might be wrong.
查看这个。它构建在 Apache Http Client 之上,支持响应缓存、身份验证、HTTP 和 HTTPS 以及许多其他功能。
Check out this. Built on top of the Apache Http Client, it has support for response caching, authentication, HTTP and HTTPS and many other features.