OpenQuizz
Une application de gestion des contenus pédagogiques
CacheControlAdapter Class Reference
Inheritance diagram for CacheControlAdapter:
Collaboration diagram for CacheControlAdapter:

Public Member Functions

def __init__ (self, cache=None, cache_etags=True, controller_class=None, serializer=None, heuristic=None, cacheable_methods=None, *args, **kw)
 
def send (self, request, cacheable_methods=None, **kw)
 
def build_response (self, request, response, from_cache=False, cacheable_methods=None)
 
def close (self)
 
- Public Member Functions inherited from HTTPAdapter
def __init__ (self, pool_connections=DEFAULT_POOLSIZE, pool_maxsize=DEFAULT_POOLSIZE, max_retries=DEFAULT_RETRIES, pool_block=DEFAULT_POOLBLOCK)
 
def __getstate__ (self)
 
def __setstate__ (self, state)
 
def init_poolmanager (self, connections, maxsize, block=DEFAULT_POOLBLOCK, **pool_kwargs)
 
def proxy_manager_for (self, proxy, **proxy_kwargs)
 
def cert_verify (self, conn, url, verify, cert)
 
def build_response (self, req, resp)
 
def get_connection (self, url, proxies=None)
 
def request_url (self, request, proxies)
 
def add_headers (self, request, **kwargs)
 
def proxy_headers (self, proxy)
 
def send (self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None)
 
- Public Member Functions inherited from BaseAdapter
def __init__ (self)
 

Data Fields

 cache
 
 heuristic
 
 cacheable_methods
 
 controller
 
 chunk_left
 
- Data Fields inherited from HTTPAdapter
 max_retries
 
 config
 
 proxy_manager
 
 poolmanager
 

Static Public Attributes

 invalidating_methods
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  cache = None,
  cache_etags = True,
  controller_class = None,
  serializer = None,
  heuristic = None,
  cacheable_methods = None,
args,
**  kw 
)

Member Function Documentation

◆ build_response()

def build_response (   self,
  request,
  response,
  from_cache = False,
  cacheable_methods = None 
)
Build a response by making a request or using the cache.

This will end up calling send and returning a potentially
cached response

◆ close()

def close (   self)
Disposes of any internal state.

Currently, this closes the PoolManager and any active ProxyManager,
which closes any pooled connections.

Reimplemented from HTTPAdapter.

◆ send()

def send (   self,
  request,
  cacheable_methods = None,
**  kw 
)
Send a request. Use the request information to see if it
exists in the cache and cache the response if we need to and can.

Field Documentation

◆ cache

cache

◆ cacheable_methods

cacheable_methods

◆ chunk_left

chunk_left

◆ controller

controller

◆ heuristic

heuristic

◆ invalidating_methods

invalidating_methods
static

The documentation for this class was generated from the following file: