]>
jfr.im git - dlqueue.git/blob - venv/lib/python3.11/site-packages/pip/_vendor/cachecontrol/wrapper.py
1 # SPDX-FileCopyrightText: 2015 Eric Larson
3 # SPDX-License-Identifier: Apache-2.0
5 from .adapter
import CacheControlAdapter
6 from .cache
import DictCache
15 controller_class
=None,
17 cacheable_methods
=None,
20 cache
= DictCache() if cache
is None else cache
21 adapter_class
= adapter_class
or CacheControlAdapter
22 adapter
= adapter_class(
24 cache_etags
=cache_etags
,
25 serializer
=serializer
,
27 controller_class
=controller_class
,
28 cacheable_methods
=cacheable_methods
,
30 sess
.mount("http://", adapter
)
31 sess
.mount("https://", adapter
)