Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, maxsize, missing=None, getsizeof=None, delitem=lambda key: None):
LRUCache.__init__(self, maxsize, missing, getsizeof)
self.__delitem = delitem
def __init__(self, maxsize, missing=None, getsizeof=None, delitem=lambda key: None):
LRUCache.__init__(self, maxsize, missing, getsizeof)
self.__delitem = delitem
def __init__(self, maxsize, ttl, getsizeof=None, timer=time.time):
if getsizeof is not None:
LRUCache.__init__(self, maxsize, lambda e: getsizeof(e[0]))
else:
LRUCache.__init__(self, maxsize)
root = _Link()
root.prev = root.next = root
self.__root = root
self.__timer = timer
self.__ttl = ttl
def __init__(self, maxsize, ttl, getsizeof=None, timer=time.time):
if getsizeof is not None:
LRUCache.__init__(self, maxsize, lambda e: getsizeof(e[0]))
else:
LRUCache.__init__(self, maxsize)
root = _Link()
root.prev = root.next = root
self.__root = root
self.__timer = timer
self.__ttl = ttl