Browse Source

Update CacheControl library 0.12.5 (cd91309) → 0.12.5 (0fedbba).

pull/1200/head
JackDandy 7 years ago
parent
commit
9cb1f0d7a5
  1. 1
      CHANGES.md
  2. 2
      lib/cachecontrol/adapter.py
  3. 2
      lib/cachecontrol/controller.py
  4. 2
      lib/cachecontrol/wrapper.py

1
CHANGES.md

@ -1,5 +1,6 @@
### 0.19.0 (2019-xx-xx xx:xx:xx UTC) ### 0.19.0 (2019-xx-xx xx:xx:xx UTC)
* Update CacheControl library 0.12.5 (cd91309) to 0.12.5 (0fedbba)
[develop changelog] [develop changelog]

2
lib/cachecontrol/adapter.py

@ -24,7 +24,7 @@ class CacheControlAdapter(HTTPAdapter):
**kw **kw
): ):
super(CacheControlAdapter, self).__init__(*args, **kw) super(CacheControlAdapter, self).__init__(*args, **kw)
self.cache = cache or DictCache() self.cache = DictCache() if cache is None else cache
self.heuristic = heuristic self.heuristic = heuristic
self.cacheable_methods = cacheable_methods or ("GET",) self.cacheable_methods = cacheable_methods or ("GET",)

2
lib/cachecontrol/controller.py

@ -34,7 +34,7 @@ class CacheController(object):
def __init__( def __init__(
self, cache=None, cache_etags=True, serializer=None, status_codes=None self, cache=None, cache_etags=True, serializer=None, status_codes=None
): ):
self.cache = cache or DictCache() self.cache = DictCache() if cache is None else cache
self.cache_etags = cache_etags self.cache_etags = cache_etags
self.serializer = serializer or Serializer() self.serializer = serializer or Serializer()
self.cacheable_status_codes = status_codes or (200, 203, 300, 301) self.cacheable_status_codes = status_codes or (200, 203, 300, 301)

2
lib/cachecontrol/wrapper.py

@ -13,7 +13,7 @@ def CacheControl(
cacheable_methods=None, cacheable_methods=None,
): ):
cache = cache or DictCache() cache = DictCache() if cache is None else cache
adapter_class = adapter_class or CacheControlAdapter adapter_class = adapter_class or CacheControlAdapter
adapter = adapter_class( adapter = adapter_class(
cache, cache,

Loading…
Cancel
Save