Rc@sddlmZddlmZyddlmZWn!ek rWddlmZnXdgZeZ defdYZ dS(i(tMutableMapping(tRLock(t OrderedDictitRecentlyUsedContainercBsbeZdZeZdd dZdZdZdZ dZ dZ dZ d Z RS( s Provides a thread-safe dict-like container which maintains up to ``maxsize`` keys while throwing away the least-recently-used keys beyond ``maxsize``. :param maxsize: Maximum number of recent elements to retain. :param dispose_func: Every time an item is evicted from the container, ``dispose_func(value)`` is called. Callback which will get called i cCs1||_||_|j|_t|_dS(N(t_maxsizet dispose_funct ContainerClst _containerRtlock(tselftmaxsizeR((s8/usr/lib/python2.7/dist-packages/urllib3/_collections.pyt__init__&s  cCs7|j(|jj|}||j|<|SWdQXdS(N(RRtpop(R tkeytitem((s8/usr/lib/python2.7/dist-packages/urllib3/_collections.pyt __getitem__-s  cCst}|j]|jj|t}||j|s