如何使用 Python 请求清除缓存? [英] How do I clear cache with Python Requests?
本文介绍了如何使用 Python 请求清除缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Python的requests
包是否默认缓存数据?
Does the requests
package of Python cache data by default?
例如
import requests
resp = requests.get('https://some website')
响应会被缓存吗?如果是这样,我该如何清除它?
Will the response be cached? If so, how do I clear it?
推荐答案
Python-requests 没有任何缓存功能.
Python-requests doesn't have any caching features.
但是,如果您需要它们,您可以查看 requests-cache,尽管我从来没用过.
However, if you need them you can look at requests-cache, although I never used it.
最后一次发布是在 2019 年 8 月.
Its last release was in Aug 2019.
这篇关于如何使用 Python 请求清除缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文