commit | 9f8158be04a09adbc58873ffebf27ad88c9dbaa9 | [log] [tgz] |
---|---|---|
author | Tobias Henkel <tobias.henkel@bmw.de> | Wed Dec 20 19:11:56 2017 +0100 |
committer | Tobias Henkel <tobias.henkel@bmw.de> | Wed Dec 20 19:34:15 2017 +0100 |
tree | 7811420b6f8befc4f0cc9f94e43c1a56c6156d12 | |
parent | 17a4ae8c780596dcf622ebc05340a257e87d5f09 [diff] |
Fix github caching We do caching of the requests to github using cachecontrol which is injected into the urllib3 session. The caching needs to be entirely etag based as max-age based caching leads to working with stale data. Unlike documented [1] cachecontrol doesn't priorize the etag caching but doesn't even rerequest until max-age was elapsed. Thus we need to add a custom caching heuristic [2] which simply drops the cache-control header containing max-age. This way we force cachecontrol to only rely on the etag headers. [1] http://cachecontrol.readthedocs.io/en/latest/etags.html [2] http://cachecontrol.readthedocs.io/en/latest/custom_heuristics.html Change-Id: If47e1eaa942914a243fc03666b83cd896665bd71