U .e@sxddlZddlmZddlmZddlmZddlmZddl m Z ddZ d d Z d d Z dd dZedkrtedS)N)requests)CacheControlAdapter) DictCache)logger)ArgumentParsercCs"ttjt}t|dS)N)rZsetLevelloggingDEBUGZ StreamHandlerZ addHandler)Zhandlerr A/usr/lib/python3.8/site-packages/pip/_vendor/cachecontrol/_cmd.py setup_logging s r cCs>ttdddd}t}|d||d||j|_|S)NT)Z cache_etagsZ serializerZ heuristiczhttp://zhttps://)rrrZSessionZmountZ controllercache_controller)Zadaptersessr r r get_sessions  rcCst}|jddd|S)NurlzThe URL to try and cache)help)r add_argument parse_args)parserr r r get_argssrcCsTt}t}||j}t|j|j|j|j |jrHt dnt ddS)NzCached!z Not cached :() rrgetrr r Zcache_responseZrequestrawZcached_requestprint)argsr Zrespr r r main$s  r__main__)N)rZ pip._vendorrZ pip._vendor.cachecontrol.adapterrZpip._vendor.cachecontrol.cacherZ#pip._vendor.cachecontrol.controllerrargparserr rrr__name__r r r r s