Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
wrapper.py
Go to the documentation of this file.
1# SPDX-FileCopyrightText: 2015 Eric Larson
2#
3# SPDX-License-Identifier: Apache-2.0
4
5from .adapter import CacheControlAdapter
6from .cache import DictCache
7
8
9def CacheControl(
10 sess,
11 cache=None,
12 cache_etags=True,
13 serializer=None,
14 heuristic=None,
15 controller_class=None,
16 adapter_class=None,
17 cacheable_methods=None,
18):
19
20 cache = DictCache() if cache is None else cache
21 adapter_class = adapter_class or CacheControlAdapter
22 adapter = adapter_class(
23 cache,
24 cache_etags=cache_etags,
25 serializer=serializer,
26 heuristic=heuristic,
27 controller_class=controller_class,
28 cacheable_methods=cacheable_methods,
29 )
30 sess.mount("http://", adapter)
31 sess.mount("https://", adapter)
32
33 return sess
for i