AlkantarClanX12
Current Path : /lib/python2.7/site-packages/pip/_vendor/cachecontrol/ |
Current File : //lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyo |
� ��abc @ sr d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d e f d � � YZ d S( i����N( t HTTPAdapteri ( t CacheController( t DictCache( t CallbackFileWrappert CacheControlAdapterc B sP e Z e d d g � Z d e d d d d � Z d � Z e d � Z d � Z RS( t PUTt DELETEc O sb t t | � j | | � | p% t � | _ | | _ | p= t } | | j d | d | �| _ d S( Nt cache_etagst serializer( t superR t __init__R t cachet heuristicR t controller( t selfR R t controller_classR R t argst kwt controller_factory( ( sD /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyR s c K s{ | j d k r\ | j j | � } | r= | j | | d t �S| j j | j j | � � n t t | � j | | � } | S( s� 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. t GETt from_cache( t methodR t cached_requestt build_responset Truet headerst updatet conditional_headersR R t send( R t requestR t cached_responset resp( ( sD /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyR s c s� | r| j d k r| j r4 | j j | � } n | j d k r� | j j | | � } | | k rm t } n | j d t � | j � | } q| j d k r� | j j | | � qt | j t j | j j | | � � | _ | j r| j � � f d � } t j | | � | _ qn t t | � j | | � } | j | j k ry| j ry| j j | j � } | j j | � n | | _ | S( s� Build a response by making a request or using the cache. This will end up calling send and returning a potentially cached response R i0 t decode_contenti- c s* � � | j d k r&