cachecontrol:打包用于请求的httplib2缓存算法

时间:2021-05-09 08:52:32
【文件属性】:
文件名称:cachecontrol:打包用于请求的httplib2缓存算法
文件大小:59KB
文件格式:ZIP
更新时间:2021-05-09 08:52:32
Python 快取控制 CacheControl是用于会话对象的缓存算法的端口。 之所以写这篇文章,是因为httplib2对缓存的更好支持常常由于缺乏线程安全性而被削弱。 就缓存而言,请求也是如此。 快速开始 import requests from cachecontrol import CacheControl sess = requests . session () cached_sess = CacheControl ( sess ) response = cached_sess . get ( 'http://google.com' ) 如果URL包含任何基于缓存的标头,它将把结果缓存在一个简单的字典中。 有关更多信息,请查看
【文件预览】:
cachecontrol-master
----setup.py(2KB)
----.gitignore(177B)
----cachecontrol()
--------compat.py(730B)
--------caches()
--------controller.py(15KB)
--------wrapper.py(774B)
--------__init__.py(464B)
--------filewrapper.py(3KB)
--------serialize.py(6KB)
--------cache.py(917B)
--------adapter.py(5KB)
--------heuristics.py(4KB)
--------_cmd.py(1KB)
----Makefile(1KB)
----CONTRIBUTORS.rst(327B)
----.travis.yml(258B)
----.bumpversion.cfg(204B)
----setup.cfg(207B)
----examples()
--------benchmark.py(1KB)
----README.rst(1KB)
----tests()
--------test_chunked_response.py(1KB)
--------conftest.py(4KB)
--------test_adapter.py(2KB)
--------test_regressions.py(963B)
--------test_max_age.py(2KB)
--------test_expires_heuristics.py(7KB)
--------test_storage_filecache.py(4KB)
--------test_serialization.py(5KB)
--------test_etag.py(5KB)
--------test_storage_redis.py(445B)
--------test_redirects.py(2KB)
--------test_cache_control.py(8KB)
--------test_vary.py(3KB)
--------test_server_http_version.py(242B)
----dev_requirements.txt(178B)
----LICENSES()
--------Apache-2.0.txt(10KB)
----docs()
--------release_notes.rst(3KB)
--------Makefile(6KB)
--------index.rst(2KB)
--------conf.py(8KB)
--------storage.rst(4KB)
--------tips.rst(2KB)
--------custom_heuristics.rst(5KB)
--------etags.rst(5KB)
--------usage.rst(2KB)
----tox.ini(247B)

网友评论