� ��abc@ sCddlmZddlmZd�Zdefd��YZdS(i����(tdivision(tdatetimecC sJt|d�r|j�S|j}|j|jdd}||ddS(sPython 2.6 compatabilityt total_secondsiii ii@Bi@B(thasattrRt microsecondstsecondstdays(ttdtmstsecs((sO/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.pyRs   t RedisCachecB sAeZd�Zd�Zdd�Zd�Zd�Zd�ZRS(cC s ||_dS(N(tconn(tselfR ((sO/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.pyt__init__scC s|jj|�S(N(R tget(R tkey((sO/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.pyRscC sL|s|jj||�n,|tj�}|jj|t|�|�dS(N(R tsetRtnowtsetexR(R Rtvaluetexpires((sO/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.pyRscC s|jj|�dS(N(R tdelete(R R((sO/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.pyRscC s.x'|jj�D]}|jj|�qWdS(sIHelper for clearing all the keys in a database. Use with caution!N(R tkeysR(R R((sO/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.pytclear"scC s|jj�dS(N(R t disconnect(R ((sO/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.pytclose(sN( t__name__t __module__R RtNoneRRRR(((sO/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.pyR s      N(t __future__RRRtobjectR (((sO/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.pyts